SIGN IN SIGN UP

feat(mon-hosts): add a host events API

The History tab of the host and of the service slide-in needs the
recent monitoring log entries of a host, and of a single service,
without the frontend having to know the log's semantics.

One endpoint serves both: a GET on /monitor/hosts/{hostname}/events
returns the host's own events together with those of all its
services, and an optional service_name parameter narrows the list to
a single service. The time window is a parameter defaulting to 8
days, and the legacy link follows the filter, pointing at either
hostsvcevents or svcevents.

The event icons are resolved server side, mirroring the log_icon
painter, so that mapping stays where the mode icons already live.

The livestatus query carries an OrderBy, which makes the core sort
before applying the Limit, so the cap keeps the newest rows instead
of the oldest ones the log table streams first. Only the primary
sort reaches the core, hence the tie-break by line number in Python.

CMK-38030
CMK-38114

Change-Id: I0d2005d9adbb4f33835db1a9a52173033ca17f07
B
Benjamin Knapp committed
e57066619a9688aa7423b4617ef739bf8d3a8389
Parent: 52fdeaa
Committed by Jenkins <jenkins@review.lan.tribe29.com> on 8/21/2026, 10:02:20 AM