Custom queries to export additional metrics from database data
Is your feature request related to a problem? Please describe. When using postgres_exporter, I have the ability to write custom queries to create additional metrics based on database data. Would be nice to have that option in mongodb_exporter too, so I wouldn't have to roll out my own home baked script.
https://github.com/prometheus-community/postgres_exporter#flags
postgres implementation was last changed in: https://github.com/prometheus-community/postgres_exporter/pull/801/files (in case you're following the readme and hitting dead links)
Describe the solution you'd like I'd like to write a mongodb query and have the results available as a metric.
Describe alternatives you've considered
- Use Grafana Enterprise with mongodb datasource plugin (and run the query in grafana instead)
- Write my own cronjob/script to run the queries and export metrics (i.e. by using node_exporter text collector)
- Write my own exporter for my specific needs
Hello @Lusitaniae, Thank you for your report. postgres_exporter is deprecating that feature https://github.com/prometheus-community/postgres_exporter/blob/master/CHANGELOG.md#0130--2023-06-21. We need to discuss it within the team.
yeah, unfortunately no equivalent of https://github.com/burningalchemist/sql_exporter for nosql databases yet
Anyway, unless you'd really like this feature too, feel free to close the Issue and on my side I'll work something out for my needs.