feat(alerts): the host's temperature and throughput can drive alert rules (#5787)
CI / lint (push) Successful in 2s
CI / integration (push) Successful in 1m23s
CI / unit (push) Successful in 1m30s
CI / publish (push) Successful in 1m23s

temp_c_max was recorded on every ingest, but host_agent didn't offer it
to rules, so "host running hot" couldn't be watched. The catalog guard
didn't see the row(...) helper ingest builds its rows with. Now offered:
temp_c_max, temp_c per sensor, and network and disk throughput per host,
interface and disk. A new guard holds every literal row(...) name to the
catalog, except NOT_ALERTABLE, where each exclusion is given a reason.
temp_c_max reads in °C.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 22:20:11 -04:00
co-authored by Claude Opus 5.5
parent 9a11f5788f
commit 26a3ec3339
5 changed files with 57 additions and 3 deletions
+4
View File
@@ -178,4 +178,8 @@ def test_metric_names_and_units_read_in_words():
assert metric_label("if_in_octets") == "if in octets"
assert metric_unit("cert_expiry_days") == "days" and metric_unit("seconds_since_seen") == "seconds"
assert metric_unit("is_up") == "" and metric_unit("request_rate") == "req/s"
# The host's hottest sensor reads in °C though its name ends in _max (#5787).
from steward.core.formatting import metric_value
assert metric_unit("temp_c_max") == "°C" and metric_value("temp_c_max", 71.4) == "71°C"
assert metric_label("temp_c_max") == "Hottest sensor"
assert source_label("host_agent") == "Host agent" and source_label("my_plugin") == "my plugin"