Usage: mongodb_exporter [flags]
MongoDB Prometheus exporter
Flags:
-h, --help Show context-sensitive help.
--mongodb.user=monitorUser monitor user, need clusterMonitor role in admin db and read
role in local db ($MONGODB_USER)
--mongodb.password=monitorPassword
monitor user password ($MONGODB_PASSWORD)
--mongodb.collstats-colls=db1,db2.col2
List of comma separared databases.collections to get
$collStats
--mongodb.indexstats-colls=db1.col1,db2.col2
List of comma separared databases.collections to get
$indexStats
--mongodb.uri=mongodb://user:pass@127.0.0.1:27017/admin?ssl=true,...
MongoDB connection URI ($MONGODB_URI)
--[no-]mongodb.global-conn-pool Use global connection pool instead of creating new pool for
each http request.
--[no-]mongodb.direct-connect Whether or not a direct connect should be made. Direct
connections are not valid if multiple hosts are specified
or an SRV URI is used.
--web.listen-address=":9216" Address to listen on for web interface and telemetry
--web.telemetry-path="/metrics" Metrics expose path
--web.config=STRING Path to the file having Prometheus TLS config for basic
auth
--web.timeout-offset=1 Offset to subtract from the request timeout in seconds
--log.level="error" Only log messages with the given severity or above.
Valid levels: [debug, info, warn, error, fatal]
--mongodb.connect-timeout-ms=5000
Connection timeout in milliseconds
--[no-]collector.exporter-metrics
Enable collecting metrics about the exporter itself
(process_*, go_*)
--collector.diagnosticdata Enable collecting metrics from getDiagnosticData
--collector.diagnosticdata-histograms
Enable collecting histogram bucket metrics from
getDiagnosticData
--collector.replicasetstatus Enable collecting metrics from replSetGetStatus
--collector.replicasetconfig Enable collecting metrics from replSetGetConfig
--collector.dbstats Enable collecting metrics from dbStats
--collector.dbstatsfreestorage Enable collecting free space metrics from dbStats
--collector.topmetrics Enable collecting metrics from top admin command
--collector.currentopmetrics Enable collecting metrics currentop admin command
--collector.indexstats Enable collecting metrics from $indexStats
--collector.collstats Enable collecting metrics from $collStats
--collector.profile Enable collecting metrics from profile
--collector.fcv Enable Feature Compatibility Version collector
--collector.shards Enable collecting metrics from sharded Mongo clusters about
chunks
--collector.pbm Enable collecting metrics from Percona Backup for MongoDB
--metrics.overridedescendingindex
Enable descending index name override to replace -1 with
_DESC
--collect-all Enable all collectors. Same as specifying all
--collector.<name>
--collector.collstats-limit=0 Disable collstats, dbstats, topmetrics and indexstats
collector if there are more than <n> collections. 0=No
limit
--collector.collstats-enable-details
Enable collecting index details and wired tiger metrics
from $collStats
--collector.profile-time-ts=30 Set time for scrape slow queries.
--collector.currentopmetrics-slow-time="5m"
Set minimum time for registration queries.
--[no-]discovering-mode Enable autodiscover collections
--[no-]compatible-mode Enable old mongodb-exporter compatible metrics
--version Show version and exit
--[no-]split-cluster Treat each node in cluster as a separate target
Options (33)
| Option | Description | Source |
|---|---|---|
-h, --help | Show context-sensitive help. | help |
--mongodb.user monitorUser | monitor user, need clusterMonitor role in admin db and read role in local db ($MONGODB_USER) | help |
--mongodb.password monitorPassword | monitor user password ($MONGODB_PASSWORD) | help |
--mongodb.collstats-colls db1 | List of comma separared databases.collections to get $collStats | help |
--mongodb.indexstats-colls db1.col1 | List of comma separared databases.collections to get $indexStats | help |
--mongodb.uri | MongoDB connection URI ($MONGODB_URI) | help |
--web.listen-address ":9216" | Address to listen on for web interface and telemetry | help |
--web.telemetry-path "/metrics" | Metrics expose path | help |
--web.config STRING | Path to the file having Prometheus TLS config for basic auth | help |
--web.timeout-offset 1 | Offset to subtract from the request timeout in seconds | help |
--log.level "error" | Only log messages with the given severity or above. | help |
--mongodb.connect-timeout-ms 5000 | Connection timeout in milliseconds | help |
--collector.diagnosticdata | Enable collecting metrics from getDiagnosticData | help |
--collector.diagnosticdata-histograms | Enable collecting histogram bucket metrics from getDiagnosticData | help |
--collector.replicasetstatus | Enable collecting metrics from replSetGetStatus | help |
--collector.replicasetconfig | Enable collecting metrics from replSetGetConfig | help |
--collector.dbstats | Enable collecting metrics from dbStats | help |
--collector.dbstatsfreestorage | Enable collecting free space metrics from dbStats | help |
--collector.topmetrics | Enable collecting metrics from top admin command | help |
--collector.currentopmetrics | Enable collecting metrics currentop admin command | help |
--collector.indexstats | Enable collecting metrics from $indexStats | help |
--collector.collstats | Enable collecting metrics from $collStats | help |
--collector.profile | Enable collecting metrics from profile | help |
--collector.fcv | Enable Feature Compatibility Version collector | help |
--collector.shards | Enable collecting metrics from sharded Mongo clusters about chunks | help |
--collector.pbm | Enable collecting metrics from Percona Backup for MongoDB | help |
--metrics.overridedescendingindex | Enable descending index name override to replace -1 with _DESC | help |
--collect-all | Enable all collectors. | help |
--collector.collstats-limit 0 | Disable collstats, dbstats, topmetrics and indexstats collector if there are more than <n> collections. | help |
--collector.collstats-enable-details | Enable collecting index details and wired tiger metrics from $collStats | help |
--collector.profile-time-ts 30 | Set time for scrape slow queries. | help |
--collector.currentopmetrics-slow-time "5m" | Set minimum time for registration queries. | help |
--version | Show version and exit | help |