prometheus-community / prometheus-community/postgres_exporter

Template DBs Are Not Excluded

Open
#392 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3.6k
Forks
835
Avg merge
2d 4h
Merged PRs (30d)
10

Description

template0 and template1 DBs are monitored by the exporter despite DB discovery is enabled and they are added to exclude:

Exporter version:
v0.8.0

Service configuration:
EnvironmentFile=/etc/default/postgresql_exporter

Environment variables:
DATA_SOURCE_NAME="user=postgres host=/var/run/postgresql/ sslmode=disable"
PG_EXPORTER_AUTO_DISCOVER_DATABASES=true
FLAGS="--web.listen-address=:9187 --log.level=warn --exclude-databases=template0,template1"

Expected behavior:
Exclude template0 and template1 from metrics

Actual behavior:
template0 and template1 are still among metrics

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the reported v0.8.0 configuration and enabled automatic database discovery, then trace how --exclude-databases is applied during discovery. Done means template0 and template1 no longer appear in the exporter’s metrics while other discovered databases remain monitored.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.