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 case where users are prefixed with mongodb #800

Closed bvalente closed 6 months ago

bvalente commented 6 months ago

In issue https://github.com/percona/mongodb_exporter/issues/763 a user faced an error when connecting to the uri.

There is a bug when the mongodb user is prefixed with 'mongodb' that prevents the program to add the mongodb:// uri prefix.

it-percona-cla commented 6 months ago

CLA assistant check
All committers have signed the CLA.

BupycHuk commented 6 months ago

@bvalente thank you for your contribution, seems like your changes won't work for cases with mongodb+srv prefixes

bvalente commented 6 months ago

Hello again @BupycHuk, the last build failed because of a lint check, I pushed a new commit to amend the lint