To define your own MongoDB URL, use environment variable MONGODB_URI . If set this variable takes precedence over --mongodb.uri flag.
To enable HTTP basic authentication, set environment variable HTTP_AUTH to user:password pair. >Alternatively, you can use YAML file with server_user and server_password fields.
Point the process to any mongo port and it will detect if it is a mongos, replicaset member, or stand alone mongod and return the appropriate metrics for that type of node. This was done to prevent the need to an exporter per type of process.