feat(host_agent): the heat alert says which sensor set the temperature
"Host running hot" read the host's hottest sensor and didn't name it, so the operator couldn't tell what hit 100 °C on VDNT-Util01. The alert email now names the sensor and its reading, through the same names_behind a count uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -107,6 +107,13 @@ def test_stalled_mounts_are_counted_and_have_no_figures():
|
||||
assert ("disk_used_pct", "d3:/nfs/media") not in idx
|
||||
|
||||
|
||||
def test_the_heat_alert_names_the_sensor_that_set_it():
|
||||
from plugins.host_agent.routes import hottest_sensor
|
||||
temps = {"Package id 0": 86.0, "Composite": 40.0, "AUXTIN0": 110.0, "PCH_CHIP_CPU_MAX_TEMP": 0.0}
|
||||
assert hottest_sensor("box", temps) == ["Package id 0 at 86°C"]
|
||||
assert hottest_sensor("box", {"AUXTIN0": 110.0}) == []
|
||||
|
||||
|
||||
def test_a_wired_board_input_still_counts():
|
||||
"""#5759: below 100 °C a board input is a real reading."""
|
||||
from plugins.host_agent.routes import counts_as_hottest
|
||||
|
||||
Reference in New Issue
Block a user