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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user