Skip to content

Add collector for pg_connections #969

Open
@guruguruguru

Description

@guruguruguru

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions