I'm wondering if, similar to other exporters, the credentials can be passed onto the exporter using files.
For example, in the PostgreSQL exporter, the credentials can be automatically read from a file:
https://github.com/prometheus-community/postgres_exporter#environment-variables
Ideally, this would allow setting the exporter in a monitoring stack like this, using Docker secrets without having to expose the credentials:
command:
- --mongodb.uri=mongodb://${MONGO_IP}:${MONGO_PORT}/?authSource=admin
- --collect-all
environment:
MONGO_IP: ...
MONGO_PORT: ...
MONGODB_USER_FILE: /run/secrets/mongo_usr
MONGODB_PASSWORD_FILE: /run/secrets/mongo_pwd
secrets:
- mongo_usr
- mongo_pwd
I'm wondering if, similar to other exporters, the credentials can be passed onto the exporter using files.
For example, in the PostgreSQL exporter, the credentials can be automatically read from a file:
https://github.com/prometheus-community/postgres_exporter#environment-variables
Ideally, this would allow setting the exporter in a monitoring stack like this, using Docker secrets without having to expose the credentials: