mongodb_exporter
mongodb_exporter copied to clipboard
Add config option to restrict collection to specific databases
Right now you can configure the exporter to monitor specific collections, but this is verbose if you want to monitor all the collections but only in a certain database.
Would we add an option to specify the databases to monitor and the exporter could discover all the collections within that database?
Hello, I think this is a good option and it shouldn't be hard to implement.
you can use wildcards to select all collections in a database.
This worked for me to get metrics on all collections in the "yaron" database:
--mongodb.collstats-colls=yaron.* --mongodb.indexstats-colls=yaron.*"
Maybe this needs to be added to the documentation, but I think this solves the ticket, or am I missing something?