feat: alert CRITICAL on degraded or suspended ZFS pools

This commit is contained in:
2026-05-08 16:23:49 -04:00
parent 05045bafa2
commit b9db0c552e
3 changed files with 110 additions and 11 deletions
+9 -7
View File
@@ -89,14 +89,16 @@ class ZFSMonitorPlugin(MonitorPlugin):
name = parts[0].strip()
if self._pools_filter and name not in self._pools_filter:
continue
health = parts[1].strip()
pools[name] = {
"health": parts[1].strip(),
"size": _int(parts[2]),
"alloc": _int(parts[3]),
"free": _int(parts[4]),
"capacity": _float(parts[5]),
"frag": _float(parts[6]),
"dedup": _float(parts[7]),
"health": health,
"health_ok": 1 if health == "ONLINE" else 0,
"size": _int(parts[2]),
"alloc": _int(parts[3]),
"free": _int(parts[4]),
"capacity": _float(parts[5]),
"frag": _float(parts[6]),
"dedup": _float(parts[7]),
}
return pools