feat(alerts): the host's temperature and throughput can drive alert rules (#5787)
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user