Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add collector for pg_connections #969

Open
guruguruguru opened this issue Nov 28, 2023 · 1 comment · May be fixed by #1093
Open

Add collector for pg_connections #969

guruguruguru opened this issue Nov 28, 2023 · 1 comment · May be fixed by #1093

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

@dginhoux
Copy link

Hi, this will be a great metric, necessary for debugging pgsql.

@Sticksman Sticksman linked a pull request Nov 15, 2024 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants