-
-
Notifications
You must be signed in to change notification settings - Fork 39
Added docker container State.Health.Status as a metric #7 #11
Conversation
So the final implementation for the gauge is as follows:
- Healthy = 1
- Starting = 0.5
- Unhealthy = 0
- No health information, we never publish the gauge, and unpublish if it was previously published, but I don't know if that's even possible.
Here's the output. In this case, practical_merkle
is a container meant to always be unhealthy, HEALTHCHECK CMD exit 1
Any chance this can get merged @sandersaares ?
If anyone is looking to use this today, you can always use a git submodule.
git submodule add https://github.com/Cobertos/docker_exporter
Then in your docker-compose.yml
prometheus-docker-exporter:
build:
context: docker_exporter/
restart: always
container_name: prometheus-docker-exporter
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
zkhcohen
commented
Jul 15, 2021
Why hasn't this been merged yet. Really disappointing that no one has taken the time to review it... this is basic functionality.
mr-simonski
commented
Jul 23, 2021
@sandersaares I would need this as well. Our images might not start due to unforeseen situations during boot of our APIs. Docker marks them as running while our healthchecks indicate the truth, that they are starting for ages. Would be very helpful to have this merged.
Uh oh!
There was an error while loading. Please reload this page.
Fixes #7