percona / mongodb_exporter

A Prometheus exporter for MongoDB including sharding, replication and storage engines
Apache License 2.0
1.15k stars 426 forks source link

Fix splitting cluster URI into multiple targets #780

Closed adnull closed 6 months ago

adnull commented 7 months ago

As kong option parser doesn't have an option not to split quoted arguments by comma and just strips all quotes from arguments, there is no chance to specify comma-containing cluster URIs as they will be treated as separated multiple targets ( https://github.com/percona/mongodb_exporter/pull/653#issuecomment-1894399492 ).

This version improves URI splitting algorythm as folows: