- Template: microservice
- Created ABP Studio Version: 1.0.2
- Current ABP Studio Version: 1.1.2
- Multi-Tenancy: Yes
- UI Framework: mvc
- Theme: leptonx
- Theme Style: system
- Theme Menu Placement: side
- Run Install Libs: Yes
- Database Provider: ef
- Database Management System: sqlserver
- Mobile Framework: none
- Public Website: No
- Social Login: Yes
- Include Tests: Yes
- Dynamic Localization: Yes
- Kubernetes Configuration: Yes
- Grafana Dashboard: Yes
- Use Local References: No
- Optional Modules:
- GDPR
- TextTemplateManagement
- AuditLogging
- OpenIddictAdmin
- Selected Languages: English, English (United Kingdom), Español
- Default Language: English
- Create Command: abp new CloverleafCMS -t microservice --ui-framework mvc --database-provider ef --database-management-system sqlserver --theme leptonx --skip-migrator --without-cms-kit --dont-run-bundling -no-file-management -no-language-management
We're running the micro service template solution in AKS. How do we turn off the health-check messages? They're writing every 10 seconds which makes it difficult to find other log messages for debugging purposes
- Exception message and full stack trace: [20:29:17 INF] Executing endpoint 'Health checks' [20:29:17 INF] Executed endpoint 'Health checks' [20:29:17 INF] Request finished HTTP/1.1 GET http://cloverleafcms-st-apps-webgateway/health-status - 200 null application/json; charset=utf-8 0.3839ms [20:29:17 INF] Received HTTP response headers after 0.685ms - 200 [20:29:17 INF] End processing HTTP request after 1.0742ms - 200 [20:29:27 INF] Start processing HTTP request GET http://cloverleafcms-st-apps-webgateway/health-status [20:29:27 INF] Sending HTTP request GET http://cloverleafcms-st-apps-webgateway/health-status [20:29:27 INF] Request starting HTTP/1.1 GET http://cloverleafcms-st-apps-webgateway/health-status - null null [20:29:27 INF] Executing endpoint 'Health checks' [20:29:27 INF] Received HTTP response headers after 1.1401ms - 200 [20:29:27 INF] End processing HTTP request after 2.1929ms - 200 [20:29:27 INF] Executed endpoint 'Health checks' [20:29:27 INF] Request finished HTTP/1.1 GET http://cloverleafcms-st-apps-webgateway/health-status - 200 null application/json; charset=utf-8 1.594ms [20:29:37 INF] Start processing HTTP request GET http://cloverleafcms-st-apps-webgateway/health-status [20:29:37 INF] Sending HTTP request GET http://cloverleafcms-st-apps-webgateway/health-status [20:29:37 INF] Request starting HTTP/1.1 GET http://cloverleafcms-st-apps-webgateway/health-status - null null [20:29:37 INF] Executing endpoint 'Health checks' [20:29:37 INF] Executed endpoint 'Health checks' [20:29:37 INF] Request finished HTTP/1.1 GET http://cloverleafcms-st-apps-webgateway/health-status - 200 null application/json; charset=utf-8 0.531ms [20:29:37 INF] Received HTTP response headers after 0.877ms - 200 [20:29:37 INF] End processing HTTP request after 1.2642ms - 200
- Steps to reproduce the issue:
Applications using HealthChecks.UI.Client; using Microsoft.AspNetCore.Diagnostics.HealthChecks;
2 Answer(s)
-
0
To reduce or turn off the frequency of health check log messages in your ABP microservice solution, you need to adjust the polling interval of the HealthChecks UI, which is responsible for querying the health endpoints and generating these logs.
By default, the polling interval is set to 10 seconds. You can increase this interval or disable the HealthChecks UI polling if you do not need it.
How to Change the Polling Interval
- Locate the HealthChecks UI configuration in your service (typically in
HealthChecksBuilderExtensions.cs
orStartup.cs
):
services.AddHealthChecksUI(settings => { settings.AddHealthCheckEndpoint("My Health Status", "/health-status"); settings.SetEvaluationTimeInSeconds(60); // Set to 60 seconds (default is 10) });
SetEvaluationTimeInSeconds(60)
changes the polling interval to 60 seconds. Adjust this value as needed.
- Alternatively, configure via
appsettings.json
:
"HealthChecksUI": { "EvaluationTimeOnSeconds": 60 }
This will apply the interval globally for HealthChecks UI.
- If you want to completely turn off HealthChecks UI polling, you can remove or comment out the
AddHealthChecksUI
registration in your service configuration.
Additional Notes
- These log messages are generated by the HealthChecks UI querying your health endpoint. Increasing the interval or disabling the UI will reduce or eliminate these logs.
- If you are running in Kubernetes or a containerized environment, ensure that liveness/readiness probes are not set to a very low interval, as they can also generate frequent logs.
Sources:
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
- Locate the HealthChecks UI configuration in your service (typically in
-
0
hi
Can you try to exclude the message by
.Filter.ByExcluding(logEvent =>
?Log.Logger = new LoggerConfiguration() #if DEBUG .MinimumLevel.Debug() #else .MinimumLevel.Information() #endif .MinimumLevel.Override("Microsoft", LogEventLevel.Information) .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning) .Filter.ByExcluding(logEvent => { return logEvent.MessageTemplate.Text.Contains("health-status") || logEvent.MessageTemplate.Text.Contains("Health checks"); }) .Enrich.FromLogContext()
Thanks.