postgres_exporter
postgres_exporter copied to clipboard
implement a simple database filter for user queries
Port code from https://github.com/prometheus-community/postgres_exporter/compare/master...pvanderlinden:databases-filter?expand=1
Fixes #443 Tested and works as expected.
This looks promising 👍🏻 Great work
What is preventing this PR from being merged?
Can we have a feedback on this MR? Why is it not merged? @SuperQ or @sysadmind
feature branch has been rebased onto master @sysadmind :heavy_check_mark:
Anything blocking this from being merged?
@WnP This looks great - excited to see it merged! Can you share an example of what the config would look like for user queries running on specific databases?
@WnP This looks great - excited to see it merged! Can you share an example of what the config would look like for user queries running on specific databases?
@zachfeld you'll be able to use something like the following in your query.yaml
:
prod_total_users:
query: "SELECT count(*) as nb_users from users"
master: true
databases: "prod.*"
metrics:
- nb_users:
usage: "GAUGE"
description: "Total number of users."
where databases
is a valid golang regular expression.
User extended queries are now deprecated.