Update conf start HealthCheck serv
This commit is contained in:
@@ -76,9 +76,8 @@ builder.Services.AddHealthChecks()
|
||||
builder.Services
|
||||
.AddHealthChecksUI(s =>
|
||||
{
|
||||
s.AddHealthCheckEndpoint("WDC.UI_Services", "health");
|
||||
s.AddHealthCheckEndpoint("WDC_UI_HC", "health");
|
||||
s.SetEvaluationTimeInSeconds(60);
|
||||
//s.SetEvaluationTimeInSeconds(60);
|
||||
s.SetMinimumSecondsBetweenFailureNotifications(120);
|
||||
s.SetApiMaxActiveRequests(5);
|
||||
s.SetHeaderText("WDC.UI Health Check Status");
|
||||
@@ -181,11 +180,21 @@ app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
app.MapBlazorHub();
|
||||
|
||||
// config healthcheck: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks
|
||||
// prende tutti i predicati
|
||||
app.MapHealthChecks("/health", new HealthCheckOptions
|
||||
{
|
||||
Predicate = _ => true,
|
||||
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
|
||||
});
|
||||
|
||||
// nasconde tutti i dettagli
|
||||
app.MapHealthChecks("/health/live", new HealthCheckOptions
|
||||
{
|
||||
Predicate = _ => false
|
||||
});
|
||||
|
||||
app.MapFallbackToPage("/_Host");
|
||||
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user