Open Hechamon opened 6 months ago
We can also add a button, or one button per service, to the statistics page where the services are listed to let the user trigger the health checks from the web app.
Should the health check just return Healthy/Degraded/Unhealthy, or the actual services too? I could implement it so that if ListConfiguredServices
is true, it returns a detailed report about which service is healthy, and otherwise just return Healthy/Degraded/Unhealthy and nothing else.
Or more uniform: Always a json object, but it contains either the general status only or includes services too:
{
"BaGetter": "Healthy",
"Sqlite": "Healthy"
}
Not sure if "BaGetter" is clear enough or if something like "OverallStatus" or completely different would be better, as that value represents the aggregated result of all health checks.
Or just "Status".
I would go with Status
and the ListConfiguredServices
idea:
{
"Status": "Healthy"
}
If atleast one service fails Status
is unhealthy
too.
{
"Status": "Unhealthy",
"MySql": "Unhealthy"
}
Or the app is somehow unhealty itself but the DB is healthy:
{
"Status": "Unealthy",
"MySql": "Healthy"
}
Just tried it: the status property is automatically unhealthy when at least one other health check is unhealthy.
This first feature includes db checks and usage of all configured and registered checks.
This means we can now easily add additional health checks for single providers and they will be used, but we don't have to add all at once.
I propose to add another extension method to the core to add a storage health check that makes sure it's registered with the correct name, which each individual provider's activating extension can then call with its own specific implementation, similar to the AddSqlServer
etc. methods. Not entirely sure about this one yet.
I see AWS has its own health check package and function, maybe other providers have that too.
This issue is stale because it has been open for 90 days with no activity. Remove the stale label, comment, or this will be closed in 5 days.
Is your feature request related to a problem? Please describe.
105 added a basic health check endpoint, which could be expanded upon
Describe the solution you'd like
BaGetter is only really healthy if the database is at least reachable, so let's check that The two ways of doing this which I can see are the following