Monitoring with Prometheus

I’m going to use “prometheus”.

However, since MongoDB does not support HTTP from 3.6, we are forced to use 3.4.

Disable HTTP Interface
Changed in version 3.6: MongoDB 3.6 removes the deprecated HTTP interface and REST API to MongoDB.

But I want to know how to use the latest version of MongoDB in other ways.
What do other people usually use instead of HTTP?

Any one of the optimized native drivers that use a binary wire protocol. See

You should not need http for prometheus. I do not use it myself but there is a exporter and it connects as a standard mongo client.

1 Like

I think HTTP is the way to connect exporter and MongoDB.

Although it was not connected in the latest version, version 3.2 was connected.


To define your own MongoDB URL, use environment variable MONGODB_URI . If set this variable takes precedence over --mongodb.uri flag.

To enable HTTP basic authentication, set environment variable HTTP_AUTH to user:password pair. >Alternatively, you can use YAML file with server_user and server_password fields.

export MONGODB_URI=‘mongodb://localhost:27017’ export HTTP_AUTH=‘user:password’ ./bin/mongodb_exporter []

Note about how this works

Point the process to any mongo port and it will detect if it is a mongos, replicaset member, or stand alone mongod and return the appropriate metrics for that type of node. This was done to prevent the need to an exporter per type of process.

Thank you :smiley:

I think it’s settled.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.