Skip to content

hot_standby_delay: use underscore in receive_delay perfdata label#219

Open
jeremyj wants to merge 1 commit into
bucardo:masterfrom
jeremyj:fix-hot-standby-perfdata-label
Open

hot_standby_delay: use underscore in receive_delay perfdata label#219
jeremyj wants to merge 1 commit into
bucardo:masterfrom
jeremyj:fix-hot-standby-perfdata-label

Conversation

@jeremyj
Copy link
Copy Markdown

@jeremyj jeremyj commented May 18, 2026

Summary

The hot_standby_delay action emits three perfdata metrics: replay_delay, receive-delay, and time_delay. The middle one uses a hyphen — the other two use underscores.

Nagios itself tolerates hyphens in perfdata label names, but stricter consumers (notably Checkmk) reject them and emit an UNKNOWN / crash report when parsing the perfdata. Hit this in production on a Checkmk-monitored Postgres replica today — the check ran fine, exit code 0, but Checkmk crashed parsing the perfdata.

This PR renames the English and Spanish translation strings for hs-receive-delay from receive-delay to receive_delay so the emitted label is consistent with its siblings and parseable by strict consumers.

Notes

  • Hash key hs-receive-delay is left unchanged — only the value it resolves to (and therefore the emitted perfdata label) is altered.
  • The French and German translations of hs-receive-delay use multi-word strings ("délai de réception", "Empfangsverzögerung") which would also break strict perfdata parsers if the user runs check_postgres in those locales — but that's a separate localization concern, out of scope here.
  • perl -c passes.

Test plan

  • perl -c check_postgres.pl → syntax OK
  • Run check_postgres --action=hot_standby_delay against a replication pair and confirm perfdata contains receive_delay=... (not receive-delay=...)

Nagios perfdata label names should not contain hyphens; while Nagios
itself is permissive, strict consumers (e.g. Checkmk) reject the label
and raise an UNKNOWN/crash. The sibling labels (replay_delay,
time_delay) already use underscores; this aligns receive-delay with
them.

Updated the English and Spanish translation entries that emit the
perfdata label literally. The hash key 'hs-receive-delay' is left
unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant