The review of #129 found false alarms and a silent failure: the NVMe temperature bit, old-age attributes, a fan's minimum or latched alarm, an unrelated hot sensor and a board chip's limits could raise a condition, while a hung smartctl stopped the fans' looks and an old readings file passed as healthy. Read spinning drives hourly (smartd too) so a read never keeps one from spinning down, and skip a drive that cannot say whether it sleeps.
91 lines
3.1 KiB
JSON
91 lines
3.1 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. A drive\n# behind a USB bridge that cannot say whether it is asleep is checked anyway by smartd, and may be woken\n# (novox/hq ADR 0256); the watch does not read such a drive. 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. It checks each drive\n# hourly (-i 3600), not every half hour: a drive read more often than its standby timer never spins down,\n# and the module's watch reads a spinning drive hourly too.\n[Unit]\nConditionVirtualization=\n\n[Service]\nExecStart=\nExecStart=/usr/bin/smartd -n -q never -i 3600\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"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|