mongodb-query-exporter icon indicating copy to clipboard operation
mongodb-query-exporter copied to clipboard

[Question] Is is possible to use a variable database ?

Open VannTen opened this issue 2 years ago • 2 comments

I'm working on setting up the exporter for our project.

We have autodeployed dev environnements with one database for each environment, is it possible to make the database value inside the config depend on a variable environment ?

For example:

aggregations:
  - database:  ${DB}
    collection: collection_x
    ...

VannTen avatar Apr 07 '22 08:04 VannTen

This is not supported but sounds like something nice to implement.

raffis avatar Apr 07 '22 10:04 raffis

This is not supported but sounds like something nice to implement. Ok, thanks for the info.

In my usecase, I just thought about a possiblity: instead of specifying the config directly in Helm values, I'll create a configMap with a Helm template and use that for the exporter, that should do the trick :)

VannTen avatar Apr 07 '22 11:04 VannTen