-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to customize HTTP status codes for Prometheus.Metrics #566
Comments
…sult and http status codes for HealthChecks.Prometheus.Metrics
I need this implemetation... 👍 |
A PR for this feature is welcome. Feel free to contribute |
I solved with another method... like this: |
What would you like to be added:
Similar to the healthchecks, I would like to have the ability to map health check results to http status codes for the prometheus metrics publisher.
Why is this needed:
We are currently using the Prometheus health check exporters, and have configured prometheus to scrape /healthmetrics endpoint for all instances at a given interval. This works well as long as health checks are reporting healthy or degraded, we get the metrics for individual health checks.
However, the default behavior whenever a health check reports Unhealthy is to add a http response code of 503 service unavailable. For prometheus, this means that the entire scrape job is aborted, and metrics are not collected for that scrape. This means that we lose fine-grained details about which health check is failing.
I have a fix ready to go if this feature request is ok.
The text was updated successfully, but these errors were encountered: