Skip to content
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

Add collector for pg_connections #969

Open
guruguruguru opened this issue Nov 28, 2023 · 0 comments
Open

Add collector for pg_connections #969

guruguruguru opened this issue Nov 28, 2023 · 0 comments

Comments

@guruguruguru
Copy link

Proposal

We had a query to count all connections by machine, which we lost due to deprecation of the queries file. I am sure others would profit from this as well

pg_connections_by_machine:
  query: "select count(*) as count, client_hostname from pg_stat_activity where client_hostname is not null group by client_hostname ;"
  master: true
  metrics:
    - client_hostname:
        usage: "LABEL"
        description: "Name of connecting client"
    - count:
        usage: "GAUGE"
        description: "Number of Connections"

If there is another easy solution for this which I am missing right now please tell me.

Regards,
Dennis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant