Skip to content

Commit d67f79d

Browse files
authored
PMM-12712 Doc about new shards collector. (#778)
* PMM-12712 Doc about new shards collector. * PMM-12712 Typo.
1 parent cb3db89 commit d67f79d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,17 @@ Usage example: `db.setProfilingLevel(2)`
128128
|1| The profiler collects data for operations that take longer than the value of `slowms` or that match a filter.<br> When a filter is set: <ul><li> The `slowms` and `sampleRate` options are not used for profiling.</li><li>The profiler only captures operations that match the filter.</li></ul>
129129
|2|The profiler collects data for all operations.|
130130

131+
#### Enabling shards metrics gathering
132+
When shard metrics collection is enabled by `--collector.shards`, the exporter will expose metrics related to sharded Mongo.
133+
Example, if shards collector is enabled:
134+
```
135+
# HELP mongodb_shards_collection_chunks_count sharded collection chunks.
136+
# TYPE mongodb_shards_collection_chunks_count counter
137+
mongodb_shards_collection_chunks_count{collection="system.sessions",database="config",shard="rs1"} 250
138+
mongodb_shards_collection_chunks_count{collection="system.sessions",database="config",shard="rs2"} 250
139+
```
140+
You can see shard name, it's collection, database and count.
141+
131142
#### Cluster role labels
132143
The exporter sets some topology labels in all metrics.
133144
The labels are:

REFERENCE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
|--collector.collstats-limit=0|Disable collstats, dbstats, topmetrics and indexstats collector if there are more than \<n\> collections. 0=No limit|
2828
|--collector.profile-time-ts=30|Set time for scrape slow queries| This interval must be synchronized with the Prometheus scrape interval|
2929
|--collector.profile|Enable collecting metrics from profile|
30+
|--collector.shards|Enable collecting metrics related to Mongo shards|
3031
|--metrics.overridedescendingindex| Enable descending index name override to replace -1 with _DESC ||
3132
|--version|Show version and exit|

0 commit comments

Comments
 (0)