Percona MongoDB Exporter
Percona MongoDB Exporter
hub.docker.com/r/percona/mongodb_exporter
OverviewTags
https://github.com/percona/mongodb_exporter/
MongoDB exporter
Go passing go report A+
release v0.41.1
This is the new MongoDB exporter implementation that handles ALL metrics exposed by
MongoDB monitoring commands. This new implementation loops over all the fields coverage unknown
exposed in diagnostic commands and tries to get data from them.
$collStats
chat invalid server
$indexStats
getDiagnosticData
replSetGetStatus
serverStatus
old 0.1x.y version (ex master branch) is moved to the release-0.1x branch.
If you considering migrating from the old version of the exporter - you can
use flag --compatible-mode to expose metrics in the old metric names. This
Flags
1/4
Flag Description Example
-- Disable collecting
disable.diagnosticdata metrics from
getDiagnosticData
-- Disable collecting
disable.replicasetstatus metrics from
replSetGetStatus
├── build
│ ├── config.yaml
│ ├── mongodb_exporter_7c73946_checksums.txt
│ ├── mongodb_exporter-7c73946.darwin-amd64.tar.gz
│ ├── mongodb_exporter-7c73946.linux-amd64.tar.gz
│ ├── mongodb_exporter_darwin_amd64
│ │ └── mongodb_exporter <--- MacOS binary
│ └── mongodb_exporter_linux_amd64
│ └── mongodb_exporter <--- Linux binary
2/4
If you built the exporter using the method mentioned in the previous section, the generated binaries are in
mongodb_exporter_linux_amd64/mongodb_exporter or
mongodb_exporter_darwin_amd64/mongodb_exporter
Docker
Permissions
{
"role":"clusterMonitor",
"db":"admin"
},
{
"role":"read",
"db":"local"
}
Example
mongodb_exporter_linux_amd64/mongodb_exporter --mongodb.uri=mongodb://127.0.0.1:17001
--mongodb.collstats-colls receives a list of databases and collections to monitor using collstats. Usage
example: --mongodb.collstats-colls=database1.collection1,database2.collection2
mongodb_exporter_linux_amd64/mongodb_exporter --mongodb.uri=mongodb://127.0.0.1:17001 --
mongodb.collstats-colls=db1.c1,db2.c2
When compatibility mode is enabled by the --compatible-mode, the exporter will expose all new metrics with
the new naming and labeling schema and at the same time will expose metrics in the version 1 compatible
way. For example, if compatibility mode is enabled, the metric mongodb_ss_wt_log_log_bytes_written (new
format)
The exporter sets some topology labels in all metrics. The labels are:
mongos mongos
3/4
Server type Label
arbiter shardsvr
cl_id: Cluster ID
rs_nm: Replicaset name
rs_state: Replicaset state is an integer from getDiagnosticData() -> replSetGetStatus.myState.
Check the official documentation for details on replicaset status values.
4/4