postgres_exporter icon indicating copy to clipboard operation
postgres_exporter copied to clipboard

implement a simple database filter for user queries

Open WnP opened this issue 3 years ago • 2 comments

Port code from https://github.com/prometheus-community/postgres_exporter/compare/master...pvanderlinden:databases-filter?expand=1

Fixes #443 Tested and works as expected.

WnP avatar Feb 09 '22 12:02 WnP

This looks promising 👍🏻 Great work

splitt3r avatar Apr 19 '22 11:04 splitt3r

What is preventing this PR from being merged?

ilanKeshet avatar Oct 12 '22 11:10 ilanKeshet

Can we have a feedback on this MR? Why is it not merged? @SuperQ or @sysadmind

sebglon avatar Feb 02 '23 10:02 sebglon

feature branch has been rebased onto master @sysadmind :heavy_check_mark:

WnP avatar Feb 14 '23 11:02 WnP

Anything blocking this from being merged?

nvx avatar Jun 06 '23 05:06 nvx

@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 avatar Jun 06 '23 14:06 zachfeld

@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.

WnP avatar Jun 13 '23 11:06 WnP

User extended queries are now deprecated.

SuperQ avatar Jun 22 '23 06:06 SuperQ