Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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)
- Loading branch information