prometheus-community / prometheus-community/postgres_exporter
Default metrics does not exclude databases
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 835
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 10
Description
What did you do?
- Using "--auto-discover-databases"
- Using "--exclude-databases" to exclude certain default databases like "postgres", "template0", ....
What did you expect to see?
- All metrics should only generated for the databases which are not excluded
What did you see instead? Under which circumstances?
- At least the following metrics "pg_locks_count" and "pg_stat_activity_count" are also generated for excluded databases
Environment
-
postgres_exporter version:
0.11.1
-
postgres_exporter flags:
--disable-settings-metrics
--auto-discover-databases
--exclude-databases postgres,template0
-
PostgreSQL version:
14.4
Is this behavior known and is this behavior intended?
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
Start by reproducing the issue with --auto-discover-databases and --exclude-databases, then trace how database filtering is applied to pg_locks_count and pg_stat_activity_count. Done means excluded databases such as postgres and template0 produce no metrics while other discovered databases still do.
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
- Mostly clear
- Newbie friendliness
- 35/100