prometheus-community / prometheus-community/postgres_exporter

Hardcoded slot_name in pg_stat_wal_receiver collector

Open
#1,012 0 comments 3 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

https://github.com/prometheus-community/postgres_exporter/blob/b126e621db083d4299120c02b157e0e13aafa7a4/collector/pg_stat_walreceiver.go#L118C3-L118C68

slot_name format is hardcoded to be repmgr_slot_([0-9]*), while slots can have any name you like.
With custom slot names the whole collector doesn't work with collector=stat_wal_receiver msg="Skipping wal receiver stats because upstream_node is null" message

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 in collector/pg_stat_walreceiver.go at the referenced line and inspect how slot_name is parsed and how the collector handles custom PostgreSQL replication slots. Reproduce the issue with a non-repmgr slot name, then verify that the collector reports wal receiver stats instead of logging the upstream_node warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql, prometheus
Domain
databases, observability
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.