Details
Description
Steps to reproduce:
- Run Shard with mongos instance (you can use this docker compose file https://github.com/percona/mongodb_exporter/blob/main/docker-compose.yml#L156 to run it locally)
- Run mongodb_exporter and connect it to mongos instance (For example
./mongodb_exporter --mongodb.uri=mongodb://localhost:17000 --collector.replicasetstatus=true --log.level=debug --collect-all --web.listen-address=:9219 --compatible-mode=true
)
- open metrics page (in this case http://localhost:9219/metrics)
- find metric `mongodb_version_info`
Expected result
In this case in the label `mongodb` version you can see mongo version (for example
mongodb_version_info{mongodb="4.2.23"} 1
)
Actual result
You can see this:
mongodb_version_info{mongodb="server version is unavailable"} 1