prometheus-community / prometheus-community/postgres_exporter
pg_stat_activity_count is 0
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 835
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 10
Description
Could you give me some advice for this problem? Thanks
My metrics is 0,for example: the pg_stat_activity_count as follows:
pg_stat_activity_count{datname="check_split_004123145c2d11edb9110025908bebf4",server="0.0.0.0:5432",state="active"} 0
pg_stat_activity_count{datname="check_split_004123145c2d11edb9110025908bebf4",server="0.0.0.0:5432",state="disabled"} 0
pg_stat_activity_count{datname="check_split_004123145c2d11edb9110025908bebf4",server="0.0.0.0:5432",state="fastpath function call"} 0
pg_stat_activity_count{datname="check_split_004123145c2d11edb9110025908bebf4",server="0.0.0.0:5432",state="idle"} 0
pg_stat_activity_count{datname="check_split_004123145c2d11edb9110025908bebf4",server="0.0.0.0:5432",state="idle in transaction"} 0
pg_stat_activity_count{datname="check_split_004123145c2d11edb9110025908bebf4",server="0.0.0.0:5432",state="idle in transaction (aborted)"} 0
pg_stat_activity_count{datname="check_split_076881c45b7311edb4d2002590f91981",server="0.0.0.0:5432",state="active"} 0
pg_stat_activity_count{datname="check_split_076881c45b7311edb4d2002590f91981",server="0.0.0.0:5432",state="disabled"} 0
pg_stat_activity_count{datname="check_split_076881c45b7311edb4d2002590f91981",server="0.0.0.0:5432",state="fastpath function call"} 0
pg_stat_activity_count{datname="check_split_076881c45b7311edb4d2002590f91981",server="0.0.0.0:5432",state="idle"} 0
pg_stat_activity_count{datname="check_split_076881c45b7311edb4d2002590f91981",server="0.0.0.0:5432",state="idle in transaction"} 0
pg_stat_activity_count{datname="check_split_076881c45b7311edb4d2002590f91981",server="0.0.0.0:5432",state="idle in transaction (aborted)"} 0
pg_stat_activity_count{datname="check_split_0a18ba8c5c1411edacd90025908bebb9",server="0.0.0.0:5432",state="active"} 0
pg_stat_activity_count{datname="check_split_0a18ba8c5c1411edacd90025908bebb9",server="0.0.0.0:5432",state="disabled"} 0
pg_stat_activity_count{datname="check_split_0a18ba8c5c1411edacd90025908bebb9",server="0.0.0.0:5432",state="fastpath function call"} 0
pg_stat_activity_count{datname="check_split_0a18ba8c5c1411edacd90025908bebb9",server="0.0.0.0:5432",state="idle"} 0
pg_stat_activity_count{datname="postgres",server="0.0.0.0:5432",state="active"} 2
pg_stat_activity_count{datname="postgres",server="0.0.0.0:5432",state="disabled"} 0
pg_stat_activity_count{datname="postgres",server="0.0.0.0:5432",state="fastpath function call"} 0
pg_stat_activity_count{datname="postgres",server="0.0.0.0:5432",state="idle"} 0
pg_stat_activity_count{datname="postgres",server="0.0.0.0:5432",state="idle in transaction"} 0
pg_stat_activity_count{datname="postgres",server="0.0.0.0:5432",state="idle in transaction (aborted)"} 0
This is the actual number of connections to my database
ps -ef| grep postgres |wc -l
179
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, versions, or configuration are named. Start by comparing the exporter’s pg_stat_activity_count output with the PostgreSQL connection count and gather the exporter and PostgreSQL versions. Done means identifying why the exporter reports zeros for most databases and documenting a reproducible cause or correction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- databases, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100