Commit d368da1
Remove system colections from collstats (#917)
* Remove system colections from collstats
See #893
When the database profiler is enabled a `system.profile` collection is created for which the collection of collstats is not possible. This results in `Unauthorized` errors.
For example:
```Sep 23 11:39:03 db-01 mongodb_exporter[53912]: time="2024-09-23T11:39:03Z" level=error msg="cannot get $collstats cursor for collection <database>.system.profile: (Unauthorized) not authorized on <database> to execute command { aggregate: \"system.profile\", pipeline: [ { $collStats: { latencyStats: { histograms: false }, storageStats: { scale: 1 } } }, { $project: { storageStats.wiredTiger: 0, storageStats.indexDetails: 0 } } ], cursor: {}, lsid: { id: UUID("<lsid>" }, $clusterTime: { clusterTime: Timestamp(<timestamp>, 1099), signature: { hash: BinData(0, <signature>), keyId: <keyid> } }, $db: \"<database>\" }" collector=collstats```
Should be safe to filter out system collection when gathering collstats as it was already done for the indexstats collector.
* Remove whitespaces
---------
Co-authored-by: Jiří Čtvrtka <[email protected]>
(cherry picked from commit c673d48)1 parent a21aa58 commit d368da1
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
0 commit comments