Skip to content

hosts.cfg: additive delayred/delayyellow with a leading "+"#5

Open
SoundGoof wants to merge 1 commit into
mainfrom
feature/delayred-additive
Open

hosts.cfg: additive delayred/delayyellow with a leading "+"#5
SoundGoof wants to merge 1 commit into
mainfrom
feature/delayred-additive

Conversation

@SoundGoof

Copy link
Copy Markdown
Member

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.

@SoundGoof SoundGoof force-pushed the feature/delayred-additive branch from 29d0eec to fbdd05e Compare July 8, 2026 06:27
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.
@SoundGoof SoundGoof force-pushed the feature/delayred-additive branch from fbdd05e to e712752 Compare July 9, 2026 10:10
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