Xabaril / AspNetCore.Diagnostics.HealthChecks

Enterprise HealthChecks for ASP.NET Core Diagnostics Package
Apache License 2.0
4k stars 780 forks source link

Why returned Healthy when Uri is not available? #355

Closed Rameron closed 4 years ago

Rameron commented 4 years ago

I'm trying to receive status of server by some URI. If Uri is not available, HealthChecks-UI show it Healthy.

How to fix it?

Thanks.

CarlosLanderas commented 4 years ago

Could you show us some code? If you need some help we need some more information

Rameron commented 4 years ago

What kind of information do you want? I have just added services.AddHealthChecksUI(); and app.UseHealthChecksUI(config => { config.ApiPath = "/hc-api"; config.UIPath = "/hc-ui"; }); to my service for checking statuses, then some configure "HealthChecks-UI": { "HealthChecks": [ { "Name": "Backend Server Health Status", "Uri": "http://localhost:51050/hc" }, { "Name": "Identity Server Health Status", "Uri": "http://localhost:51052/hc" }, { "Name": "DataBase Server Health Status", "Uri": "http://0.0.0.0:5345/hc" }, { "Name": "Frontend Server Health Status", "Uri": "http://localhost:5111/hc" } ], "Webhooks": [], "EvaluationTimeOnSeconds": 10, "MinimumSecondsBetweenFailureNotifications": 60 } In case when http://localhost:5111 is not available, HealthChecks-UI show it Healthy.

Rameron commented 4 years ago

Problem resolved after updating from 2.2 to ASP.NET Core 3.0