-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support "--auto-discover-databases" feature with postgres_exporter queries #323
Comments
I've seen quite a few open issues surrounding this auto-discovery feature so I've been avoiding it myself. Below are just a few of the ones still open prometheus-community/postgres_exporter#588 |
Thanks for the quick response @keithf4, anecdotally, most of those issues I saw due to having improperly configured queries. For my use case it would be sufficient enough if queries were segmented by files so that |
So we already have our queries segmented to global and per-db. And our per-db queries already have the So if you want to try using the I don't want to the have the global queries running against all the databases. That just ends up duplicating metrics for every database that exists. |
Did this answer your question on using this feature? I don't think we'll be enabling that option by default in pgMonitor, but I think it should work for the per-db exporter if anyone wants to use it there. |
@keithf4 thanks, yea this should be sufficient for us in the meantime |
Describe the enhancement you are proposing:
Postgres_exporter has a flag you can enable called
--auto-discover-databeses
where it allows you to dynamically run queries on the databases that are inside the postgres instance (https://github.com/prometheus-community/postgres_exporter#automatically-discover-databases).As a workaround to support these queries, they need to be updated to utilize
current_database()
to add the extra label of which database the query is being ran on. It would be nice if given the current file structure we haddb specific
andinstance specific
queries so that it's easier to segment.I'm happy to work on this, I just wanted to first see if this was something that would be worthwhile.
The text was updated successfully, but these errors were encountered: