hot_standby_delay: use underscore in receive_delay perfdata label#219
Open
jeremyj wants to merge 1 commit into
Open
hot_standby_delay: use underscore in receive_delay perfdata label#219jeremyj wants to merge 1 commit into
jeremyj wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
hot_standby_delayaction emits three perfdata metrics:replay_delay,receive-delay, andtime_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-delayfromreceive-delaytoreceive_delayso the emitted label is consistent with its siblings and parseable by strict consumers.Notes
hs-receive-delayis left unchanged — only the value it resolves to (and therefore the emitted perfdata label) is altered.hs-receive-delayuse 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 -cpasses.Test plan
perl -c check_postgres.pl→ syntax OKcheck_postgres --action=hot_standby_delayagainst a replication pair and confirm perfdata containsreceive_delay=...(notreceive-delay=...)