Based on MongoDB exporter for prometheus.io, written in go (https://github.com/dcu/mongodb_exporter), but forked for full sharded support and structure changes.
The exporter is in beta/experimental state and field names are very likely to change and features may change or get removed!
export GO_VERSION=1.5.1 # if you wish to use your system version
make
The exporter can be started by running the 'mongodb_exporter' binary that is created in the build step. The exporter will try to connect to 'mongodb://localhost:27017' (no auth) as default if no options are supplied.
It is recommended to define the following options:
For more options see the help page with '-h' or '--help'
If you use MongoDB Authorization, you must:
db.getSiblingDB("admin").createUser({
user: "mongodb_exporter",
pwd: "s3cr3tpassw0rd",
roles: [
{ role: "clusterMonitor", db: "admin" },
{ role: "read", db: "local" }
]
})
mongodb_exporter -mongodb.uri mongodb://mongodb_exporter:s3cr3tpassw0rd@localhost:27017
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 preent the need to an exporter per type of process.
Content type
Image
Digest
Size
4.9 MB
Last updated
over 9 years ago
docker pull eses/mongodb_exporter