Closed ralberto closed 6 years ago
Hello, The exporter doesn't expose the mongodb_* metrics when it can't connect to the mongod instance. Therefore you can have a rule wich looks that the exporter doesn't expose those metrics. (Using prometheus)
absent(mongodb_instance_uptime_seconds{job=“$your_target”})
This rule will return 1 if the metric mongodb_instance_uptime_seconds doesn't exist in the target $your_target
@dcu open pull request https://github.com/dcu/mongodb_exporter/pull/75 for this, could you check if it is ok to merge?
The code in https://github.com/dcu/mongodb_exporter/pull/75 has been merged, so I think we can close this issue
It would be nice if this plugin exported a new metric signaling mongodb availability. There are other exporters doing that (ex. haproxy_exporter). Following the convention, it would be:
mongodb_up x ; where x=0 mongo is down; x=1 mongodb is avaialable.