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:
2026-10-30 19:04:34 -04:00
co-authored by Claude Opus 5.5
parent e51d969c43
commit 4cce3f0d12
4 changed files with 36 additions and 3 deletions
+4 -3
View File
@@ -81,9 +81,10 @@ def agents_away(hosts_away: Callable[[AsyncSession], Awaitable[set[str]]]) -> No
def names_behind(source_module: str, metric_name: str,
names: Callable[[AsyncSession, str], Awaitable[list[str]]]) -> None:
"""A figure that counts things: `await names(session, resource)` names
the things it counts right now ("web_app (0 of 1 running)"), so the
alert about it can say which. The plugin recording the figure registers it."""
"""A figure that counts things, or stands for one of several: `await
names(session, resource)` names them right now ("web_app (0 of 1 running)",
"Package id 0 at 86°C"), so the alert about it can say which. The plugin
recording the figure registers it."""
_NAMED[(source_module, metric_name)] = names