Werk #19765: Notifications: add HOSTCHILDREN macro for recursive child hosts
| Component | Notifications | ||
| Title | Notifications: add HOSTCHILDREN macro for recursive child hosts | ||
| Date | May 4, 2026 | ||
| Level | Trivial Change | ||
| Class | New Feature | ||
| Compatibility | Compatible - no manual interaction needed | ||
| Checkmk versions & editions |
|
A new notification context macro HOSTCHILDREN is now available for host
notifications. It contains a comma-separated, recursively resolved list of
all child hostnames (descendants) of the affected host. The list is computed
at activate-changes time and stored in the per-host notification config file
that the notify daemon already reads for host labels and tags. No livestatus
or REST-API query is performed at notification-send time, so the macro is
robust against site or socket issues during alerting.
The information lets administrators see, in a single mail, which downstream hosts are also impacted when a parent host goes down — without altering the existing parent-down notification suppression behaviour.
The HTML mail plug-in gained a new optional body element "Affected child
hosts" (off by default). It can be enabled per notification rule under
"Email body / content > Additional details". Other notification plug-ins
can read NOTIFY_HOSTCHILDREN from their environment.
For very large topologies the descendant list per host is capped at 1000
entries (a warning is logged if truncation occurs). The cap keeps the
resulting NOTIFY_HOSTCHILDREN env var safely below the per-variable size
limit applied by the notification daemon.