prometheus-community / prometheus-community/postgres_exporter
Only run certain queries on some databases
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 835
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 10
Description
I was wondering if it is possible to run some queries on some of the databases?
The postgres exporter auto discovers the databases, and runs all queries on all databases. Which currently logs errors in both the exporter and postgres logs. How can I restrict certain queries to only some/one of the databases (for example only run pg_stat_statements on the "main" database)? Or is that a new feature?
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 tracing PostgreSQL database auto-discovery and the exporter path that runs configured queries. Review how query configuration is represented and how database errors are reported. Done means queries such as pg_stat_statements can be restricted to selected databases without producing errors on others, with coverage for the new behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql, prometheus
- Domain
- databases, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100