hosts.cfg: additive delayred/delayyellow with a leading "+"#5
Open
SoundGoof wants to merge 1 commit into
Open
Conversation
29d0eec to
fbdd05e
Compare
A host-specific delayred normally replaces the default delays inherited from a ".default." host entry or the DELAYRED setting in xymonserver.cfg. With a leading "+" (delayred=+ntp:10) the host's entries are appended to the defaults instead, host entries first so they win for the same column. The merge with the .default. host happens in xmh_find_item() (the .default. record is only reachable there); the merge with the environment default happens in xymond's changedelay(). Scoped strictly to XMH_DELAYRED/XMH_DELAYYELLOW - the NOPROP* tags use "+" with different, xymongen-interpreted semantics. delayyellow gets the same behavior.
fbdd05e to
e712752
Compare
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.
Additive delayred/delayyellow with a leading "+"
A host-specific delayred currently replaces the default delays inherited from a .default. host entry or the DELAYRED setting in xymonserver.cfg. This adds an additive form:
0.0.0.0 .default. # delayred=conn:5
127.0.0.1 myhost # delayred=+ntp:10 → effective: ntp:10,conn:5
Host entries come first in the merged list, so the + form can also override a single column's default delay without repeating the whole list. delayyellow works identically.
Implementation: the merge with the .default. host lives in xmh_find_item() (the .default. record is only reachable there); the merge with the DELAYRED/DELAYYELLOW environment defaults lives in xymond's changedelay(). Scoped strictly to XMH_DELAYRED/XMH_DELAYYELLOW — the NOPROP* tags already use + with different, xymongen-interpreted semantics (that existing convention is also the precedent for + meaning "additive" in hosts.cfg). Plain (non-+) values keep exact replacement semantics.
Testing: verified live against a running xymond with 1-minute delays — host entry and inherited entry both deferred, unlisted columns unaffected, plain delayred= replacement semantics unchanged, and the env-layer merge confirmed with no .default. present. Testsuite 14/14 green.
No prior discussion of this found in upstream issues, PRs, or the mailing-list archives.