Files
mesh-catalog/modules/sensors/module.json
T
jochen 73610f8e3c
mesh/merge-gate pass: builds new: modules/sensors, sent nowhere; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery superseded: a newer head of the same pull request
sensors: read the machine's hardware condition on every machine (hq ADR 0256)
Temperatures against the hardware's own thresholds, fans, each drive's health and the kernel's error
counts, read-only. A root watch reads SMART so the tools need no root and never wake a sleeping drive;
smartd and the watch carry the health that raises a condition when the hardware says it is failing.
2026-10-08 13:48:53 +02:00

91 lines
2.7 KiB
JSON

{
"module": "sensors",
"version": "1",
"capabilities": [
"package-manager",
"service-manager"
],
"tools": [
"sensors_summary",
"sensors_temperatures",
"sensors_fans",
"sensors_drives",
"sensors_faults",
"sensors_health"
],
"resources": [
{
"id": "smartmontools",
"type": "package",
"package": "smartmontools"
},
{
"id": "smartd-conf",
"type": "file",
"path": "/etc/smartd.conf",
"mode": "0644",
"content": "# The mesh's (module sensors, novox/hq ADR 0256): what smartd watches. Written whole at every push;\n# an edit here is overwritten.\n#\n# Every drive smartd can find, with every check (-a). A drive in standby is skipped, never woken to be\n# checked, and the skip is not logged (-n standby,q): a server's spinning drives may sleep. No mail is\n# sent (no -m): what smartd finds goes to the journal, and the module's watch reads each drive's health\n# for the mesh's tools and its health check.\nDEVICESCAN -a -n standby,q\n"
},
{
"id": "smartd-drop-ins",
"type": "directory",
"path": "/etc/systemd/system/smartd.service.d",
"mode": "0755"
},
{
"id": "smartd-drop-in",
"type": "file",
"path": "/etc/systemd/system/smartd.service.d/10-mesh.conf",
"mode": "0644",
"content": "# The mesh's (module sensors, novox/hq ADR 0256). Written whole at every push; edit nothing here.\n#\n# smartd runs on every machine the module is assigned to, a virtual machine included, where the package's\n# unit would not start; and it stays up on a machine with no drive it can watch (-q never), where it\n# would otherwise exit, because the mesh judges this service as one that stays up.\n[Unit]\nConditionVirtualization=\n\n[Service]\nExecStart=\nExecStart=/usr/bin/smartd -n -q never\n"
},
{
"id": "smartd",
"type": "service",
"unit": "smartd.service",
"state": "running",
"boot": "enabled",
"restart-on": [
"smartd-conf",
"smartd-drop-in"
],
"health": {
"kind": "unit"
}
},
{
"id": "watch",
"type": "process",
"name": "sensors-watch",
"artifact": "tools",
"run": [
"./sensors",
"watch"
],
"health": {
"kind": "tool",
"tool": "sensors_health",
"interval": "60s",
"timeout": "10s",
"looks": 2,
"grace": "60s"
}
}
],
"build": {
"artifacts": [
{
"name": "tools",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/sensors",
"binary": "sensors",
"loads": [
"sensors"
]
}
]
}
}