Skip to content

Commit a91eee8

Browse files
author
Shashank Sinha
authored
PMM-1458 Create reference document (#484)
Create reference document for MongoDB exporter flags.
1 parent 713d50b commit a91eee8

File tree

2 files changed

+32
-23
lines changed

2 files changed

+32
-23
lines changed

README.md

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,6 @@ A flag, `--compatible-mode`, which exposes metrics with 0.1x compatible metric
2424
names has been implemented which simplifies migration from the old version to
2525
the current version.
2626

27-
## Flags
28-
|Flag|Description|Example|
29-
|-----|-----|-----|
30-
|-h, \-\-help|Show context-sensitive help||
31-
|\-\-compatible-mode|Exposes new metrics in the new and old format at the same time||
32-
|\-\-discovering-mode|Enable autodiscover collections from databases which set in collstats-colls and indexstats-colls||
33-
|\-\-mongodb.collstats-colls|List of comma separated databases.collections to get stats|\-\-mongodb.collstats-colls=testdb.testcol1,testdb.testcol2|
34-
|\-\-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|\-\-mongodb.direct-connect=false|
35-
|\-\-mongodb.indexstats-colls|List of comma separated database.collections to get index stats|\-\-mongodb.indexstats-colls=db1.col1,db1.col2|
36-
|\-\-mongodb.uri|MongoDB connection URI ($MONGODB_URI)|\-\-mongodb.uri=mongodb://user:pass@127.0.0.1:27017/admin?ssl=true|
37-
|\-\-mongodb.global-conn-pool|Use global connection pool instead of creating new connection for each http request.||
38-
|\-\-web.listen-address|Address to listen on for web interface and telemetry|\-\-web.listen-address=":9216"|
39-
|\-\-web.telemetry-path|Metrics expose path|\-\-web.telemetry-path="/metrics"|
40-
|\-\-log.level|Only log messages with the given severity or above. Valid levels: [debug, info, warn, error]|\-\-log.level=error|
41-
|\-\-no-collector.diagnosticdata|Disable collecting metrics from getDiagnosticData||
42-
|\-\-no-collector.replicasetstatus|Disable collecting metrics from replSetGetStatus||
43-
|\-\-collector.dbstats|Enable collecting metrics from dbStats||
44-
|\-\-collector.topmetrics|Enable collecting metrics from top admin command||
45-
|\-\-metrics.overridedescendingindex| Enable descending index name override to replace -1 with _DESC ||
46-
|--version|Show version and exit|
47-
4827
### Build the exporter
4928
The build process uses the dockerized version of goreleaser so you don't need to install Go.
5029
Just run `make release` and the new binaries will be generated under the build directory.
@@ -135,6 +114,9 @@ The labels are:
135114
- rs_state: Replicaset state is an integer from `getDiagnosticData()` -> `replSetGetStatus.myState`.
136115
Check [the official documentation](https://docs.mongodb.com/manual/reference/replica-states/) for details on replicaset status values.
137116

138-
## Submitting Bug Reports and adding new functionality
117+
## Usage Reference
118+
119+
See the [Reference Guide](REFERENCE.md) for details on using the exporter.
120+
## Bug Reports / Feature PR
139121

140-
please see [Contribution Guide](CONTRIBUTING.md)
122+
Refer to the [Contribution Guide](CONTRIBUTING.md).

REFERENCE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Usage Reference
2+
3+
## Flags
4+
|Flag|Description|Example|
5+
|-----|-----|-----|
6+
|-h, \-\-help|Show context-sensitive help||
7+
|--[no-]compatible-mode|Enable old mongodb-exporter compatible metrics||
8+
|--[no-]discovering-mode|Enable autodiscover collections||
9+
|--mongodb.collstats-colls|List of comma separared databases.collections to get $collStats|--mongodb.collstats-colls=db1,db2.col2|
10+
|--mongodb.indexstats-colls|List of comma separared databases.collections to get $indexStats|--mongodb.indexstats-colls=db1.col1,db2.col2|
11+
|--[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||
12+
|--[no-]mongodb.global-conn-pool|Use global connection pool instead of creating new pool for each http request||
13+
|--mongodb.uri|MongoDB connection URI ($MONGODB_URI)|--mongodb.uri=mongodb://user:pass@127.0.0.1:27017/admin?ssl=true|
14+
|--web.listen-address|Address to listen on for web interface and telemetry|--web.listen-address=":9216"|
15+
|--web.telemetry-path|Metrics expose path|--web.telemetry-path="/metrics"|
16+
|--web.config|Path to the file having Prometheus TLS config for basic auth|--web.config=STRING|
17+
|--log.level|Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal]|--log.level="error"|
18+
|--collector.diagnosticdata|Enable collecting metrics from getDiagnosticData|
19+
|--collector.replicasetstatus|Enable collecting metrics from replSetGetStatus|
20+
|--collector.dbstats|Enable collecting metrics from dbStats||
21+
|--collector.topmetrics|Enable collecting metrics from top admin command|
22+
|--collector.indexstats|Enable collecting metrics from $indexStats|
23+
|--collector.collstats|Enable collecting metrics from $collStats|
24+
|--collect-all|Enable all collectors. Same as specifying all --collector.\<name\>|
25+
|--collector.collstats-limit=0|Disable collstats, dbstats, topmetrics and indexstats collector if there are more than \<n\> collections. 0=No limit|
26+
|--metrics.overridedescendingindex| Enable descending index name override to replace -1 with _DESC ||
27+
|--version|Show version and exit|

0 commit comments

Comments
 (0)