host_sensors: read extra hwmon chips (dell_smm) as env sensors

Boxes without IPMI (Dell workstations like dev-linux) expose CPU/ambient/
SODIMM/board temps via the BIOS SMM interface (dell_smm hwmon). Add
read_hwmon_env(): labelled temps from chips in HOST_HWMON_CHIPS (default
'dell_smm') as env sensors, named '<chip> <label>' with index suffix for
repeated labels. Merged into the host-poller env sweep. No-op on hosts without
the configured chips.
This commit is contained in:
2026-06-16 19:46:39 +00:00
parent 4c68bff964
commit 5032c58f7d
2 changed files with 44 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ import time
from services import store
from services.cache import close_cache, init_cache, redis_available
from services.host import get_host_drives
from services.host_sensors import read_coretemp, read_ipmi_temps
from services.host_sensors import read_coretemp, read_hwmon_env, read_ipmi_temps
logging.basicConfig(
level=logging.INFO,
@@ -47,7 +47,7 @@ async def sweep_env() -> None:
except Exception as e:
errors.append(f"ipmi:{e}")
ipmi = []
env = [s for s in ipmi if s.get("kind") == "env"]
env = [s for s in ipmi if s.get("kind") == "env"] + read_hwmon_env()
cpu = read_coretemp() or [s for s in ipmi if s.get("kind") == "cpu"]
await store.set_host_sensors({