In our dotnet6 project we have implemented health checks in our application and we have deployed our application AzureKubernatiesServices. Recently we started facing some facing some issue. We are able to see the output of health checks correctly but in logs we are getting the fallowing error
we have implemented health check as bellow.
health service
{
services.AddHealthChecks()
.AddCheck<DatabaseHealthCheck>("db_health_check")
.AddCheck<XXXXXAPI_HealthCheck>("XXXXX_health_check")
.AddAzureServiceBusTopic(configuration["ServiceBusConnString"], configuration.GetValue<string>("ServiceBusConfig:TopicName"), "servicebus_topic_health_check")
.AddAzureServiceBusSubscription(configuration["ServiceBusConnString"], configuration.GetValue<string>("ServiceBusConfig:TopicName"), configuration.GetValue<string>("ServiceBusConfig:SubscriptionName"), "subscription_health_check");
services.AddHealthChecksUI().AddInMemoryStorage();
return services;
}
ConfigureMethod
{
app.UseEndpoints(endpoints =>
{
endpoints.MapHealthChecks("health", new HealthCheckOptions()
{
Predicate = _ => true,
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
});
endpoints.MapHealthChecksUI();
});
}
AppConfig
"HealthChecksUI": {
"HealthChecks": [
{
"Name": "HealthChecks",
"Uri": "http://xxxxx:80/health"
}
],
"EvaluationTimeInSeconds": 5,
"MinimumSecondsBetweenFailureNotifications": 60
}