Is your feature request related to a problem? Please describe.
We're using Atlas on AWS with a private endpoint. When I try to run the exporter with the srv connection string, I cannot connect to the MongoDB cluster. However if use a non srv connection string (with all the replica set nodes in it) and use --mongodb.direct-connect, the connection works without any issues.
Describe the solution you'd like
A solution would be to resolve the srv dns entry if the --mongodb.direct-connect option is set and the uri is a srv connection string. A new exporter would then be created for each replica.
Describe alternatives you've considered
The easiest alternative would be to just use the replica nodes uri instead of the srv connection string. However we currently only have the srv connection string in our configMaps.
Additional context
If you think this feature would be helpful for the project, I would gladly contribute it.
Is your feature request related to a problem? Please describe. We're using Atlas on AWS with a private endpoint. When I try to run the exporter with the
srv
connection string, I cannot connect to the MongoDB cluster. However if use a nonsrv
connection string (with all the replica set nodes in it) and use--mongodb.direct-connect
, the connection works without any issues.Describe the solution you'd like A solution would be to resolve the
srv
dns entry if the--mongodb.direct-connect
option is set and the uri is asrv
connection string. A new exporter would then be created for each replica.Describe alternatives you've considered The easiest alternative would be to just use the replica nodes uri instead of the
srv
connection string. However we currently only have thesrv
connection string in our configMaps.Additional context If you think this feature would be helpful for the project, I would gladly contribute it.