I am setting up prometheus mongodb exporter in standalone server. My mongodb is running on localhost:27017 and expose at localhost:9216 but the mongodb_up is still 0.
ERRO[0000] Cannot connect to server using url http://test:testing@localhost:27017/admin: no reachable servers source=“connection.go:86”
ERRO[0000] Can’t create mongo session to http://test:testing@localhost:27017/admin source=“mongodb_collector.go:202”
FATA[0000] listen tcp localhost::9216: bind: address already in use source=“server.go:122”
here is prometheus config
scrape_configs:
- job_name: “mongodb_exporter”
static_configs:- targets: [“localhost:9090” , “localhost:9216”]