Skip to content

pg_stat_activity_count only reporting 1. Config issue? #134

Open
@wtip

Description

@wtip

I have the exporter running but my pg_stat_activity_count is only reporting 1 connection which is not accurate. I'm running the exporter as non-superuser and followed the permissions queries. Other metrics are working fine but I guess it's not getting access to pg_stat_activity.
What queries could I run to verify that I've set the permissions properly?

postgres=# \z postgres_exporter.pg_stat_activity
                                             Access privileges
      Schema       |       Name       | Type |      Access privileges       | Column privileges | Policies
-------------------+------------------+------+------------------------------+-------------------+----------
 postgres_exporter | pg_stat_activity | view | postgres=arwdDxt/postgres   +|                   |
                   |                  |      | postgres_exporter=r/postgres |                   |
(1 row)
postgres=# \dn
            List of schemas
       Name        |       Owner
-------------------+-------------------
 postgres_exporter | postgres_exporter
 public            | postgres
postgres=# \dv postgres_exporter.pg_stat_activity
                   List of relations
      Schema       |       Name       | Type |  Owner
-------------------+------------------+------+----------
 postgres_exporter | pg_stat_activity | view | postgres

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions