docker_state_exporter
docker_state_exporter copied to clipboard
Exporter exits when it cannot inspect a container
Hello and thanks for this useful exporter!
We are using it to monitor...the state :) of our containers and have noticed that when it is deployed on a host with ephemeral containers (in our case it is a gitlab-runner), once in a while the exporter exits with message:
{"message":"Error: No such container: 23hg1k34k...
Reading the code, we think that it fails when trying to inspect a container that was just removed (by gitlab-runner).
Though you might get around this by adding a restart policy, it will probably cause alerts to be fired (such as "too-may-restarts" and "prometheus-target-missing").
We could open a PR if you wish though we are not proficient with Go.
Once again thanks for this nice exporter!
Best regards, Panos