Done
Details
Assignee
UnassignedUnassignedReporter
TimTimPriority
MediumComponents
Needs QA
YesFix versions
Story Points
0Sprint
None
Details
Details
Assignee
Unassigned
UnassignedReporter
Tim
TimPriority
Components
Needs QA
Yes
Fix versions
Story Points
0
Sprint
None
Smart Checklist
Smart Checklist
Smart Checklist
Created February 4, 2021 at 8:55 PM
Updated November 13, 2024 at 9:46 AM
Resolved March 9, 2021 at 7:40 PM
Expected results:
Assigning values using `mongodb.collstats-colls` flag only enables collection stats for the listed collections.
Assigning values using `mongodb.indexstats-colls` flag only enables index stats for the listed collections.
Actual results:
Assigning values using `mongodb.collstats-colls` flag enables both collection and index stats.
Assigning values using `mongodb.indexstats-colls` flag has no effect.
IndexStatsCollections is being assigned the values from the `mongodb.collstats-colls` flag.
Appears to be a bug here: https://github.com/percona/mongodb_exporter/blob/be2da0287d612e01e85e02b2ee920f0f2906407a/main.go#L98
HOW TO TEST:
Create a collection in MongoDB.
Add an index to the collection.
Manually start the exporter specifying the collection.index
Browse to the exporter's URL and you must see stats regarding the index usage.
CollStats shouldn't be enabled.
Example in mongo shell
Then if you start the exporter like this:
/mongodb_exporter --mongodb.uri=mongodb://127.0.0.1:17001/admin --mongodb.indexstats-colls=test.c1
and browse to http://localhost:9216/metrics
you will see something like this: (search for test.c1, the db.collection name)