OS Manuals

/usr/bin/mongodb_exporter

A Prometheus exporter for MongoDB including sharding, replication and storage engines

From prometheus-mongodb-exporter-0.37 0.37.0-r52 (enterprise-packages), captured 2026-11-08 by running mongodb_exporter --help (exit 0). permalink

Usage: mongodb_exporter

MongoDB Prometheus exporter

Flags:
  -h, --help                             Show context-sensitive help.
      --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
      --log.level="error"                Only log messages with the given severity or above.
                                         Valid levels: [debug, info, warn, error, fatal]
      --collector.diagnosticdata         Enable collecting metrics from getDiagnosticData
      --collector.replicasetstatus       Enable collecting metrics from replSetGetStatus
      --collector.dbstats                Enable collecting metrics from dbStats
      --collector.topmetrics             Enable collecting metrics from top admin command
      --collector.indexstats             Enable collecting metrics from $indexStats
      --collector.collstats              Enable collecting metrics from $collStats
      --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
      --[no-]discovering-mode            Enable autodiscover collections
      --[no-]compatible-mode             Enable old mongodb-exporter compatible metrics
      --version                          Show version and exit
Options (18)
OptionDescriptionSource
-h, --helpShow context-sensitive help.help
--mongodb.collstats-colls db1List of comma separared databases.collections to get $collStatshelp
--mongodb.indexstats-colls db1.col1List of comma separared databases.collections to get $indexStatshelp
--mongodb.uriMongoDB connection URI ($MONGODB_URI)help
--web.listen-address ":9216"Address to listen on for web interface and telemetryhelp
--web.telemetry-path "/metrics"Metrics expose pathhelp
--web.config STRINGPath to the file having Prometheus TLS config for basic authhelp
--log.level "error"Only log messages with the given severity or above.help
--collector.diagnosticdataEnable collecting metrics from getDiagnosticDatahelp
--collector.replicasetstatusEnable collecting metrics from replSetGetStatushelp
--collector.dbstatsEnable collecting metrics from dbStatshelp
--collector.topmetricsEnable collecting metrics from top admin commandhelp
--collector.indexstatsEnable collecting metrics from $indexStatshelp
--collector.collstatsEnable collecting metrics from $collStatshelp
--metrics.overridedescendingindexEnable descending index name override to replace -1 with _DESChelp
--collect-allEnable all collectors.help
--collector.collstats-limit 0Disable collstats, dbstats, topmetrics and indexstats collector if there are more than <n> collections.help
--versionShow version and exithelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.