You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have followed the instructions on how to setup health checks and got HealthChecksUI running
The health checks are working fine and the UI also loads ok. The issue is that it does not show any of my health checks.
The only way I found to make it work, was to specifically deckare the endpoint the UI should call when adding it in ConfigureServices.
public void ConfigureServices(IServiceCollection services)
{
services.AddHealthChecksUI("healthchecksdb", settings => settings.AddHealthCheckEndpoint("My health checks", "http://localhost:58811/healthz"));
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IApplicationLifetime applicationLifetime)
{
app.UseHealthChecks("/healthz",
new HealthCheckOptions()
{
Predicate = _ => true,
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
});
app.UseHealthChecksUI();
}
I would like to know why adding the UI settings to my appsettings.json does not work. See below the config I currently have in appsettings.json
{
"HealthChecks-UI": {
"HealthChecks": [
{
"Name": "My health checks",
"Uri": "http://localhost:58811/healthz"
}
],
"EvaluationTimeInSeconds": 90,
"MinimumSecondsBetweenFailureNotifications": 60
}
}
I am using the nuget package AspNetCore.HealthChecks.UI version 2.2.35 in an ASP.Net Core project targeting the .Net Framework 4.7.2
Am I missing something?
The text was updated successfully, but these errors were encountered:
Hello @ciceroneves
I can't see the app.UseHealthChecksUI line in your code.
UseHealthChecksUI is the method that wires the middlewares and binds the configurations.
Hello @ciceroneves
I can't see the app.UseHealthChecksUI line in your code.
UseHealthChecksUI is the method that wires the middlewares and binds the configurations.
Hey @CarlosLanderas,
Thanks for taking time to look into that.
I am using that line in my code. Only forgot to include it in the code snippet.
I have edited the question and added the line.
@ciceroneves, I've just tested the UIAndApiCustomization repository sample with your settings and it works just fine.
Please, Use that sample to test it and adjust your project.
Remember you can use HealthChecks-UI or HealthChecksUI settings key. The last one if the newest one to avoid problems with environment variables configuration
Hi,
I have followed the instructions on how to setup health checks and got HealthChecksUI running
The health checks are working fine and the UI also loads ok. The issue is that it does not show any of my health checks.
The only way I found to make it work, was to specifically deckare the endpoint the UI should call when adding it in ConfigureServices.
I would like to know why adding the UI settings to my appsettings.json does not work. See below the config I currently have in appsettings.json
I am using the nuget package AspNetCore.HealthChecks.UI version 2.2.35 in an ASP.Net Core project targeting the .Net Framework 4.7.2
Am I missing something?
The text was updated successfully, but these errors were encountered: