fix: correct THRESHOLD_DEFAULTS metric keys and add missing defaults

- Rename memory_monitor threshold key from 'percent' to 'memory_percent'
  so it matches exactly rather than relying on suffix stripping, which was
  causing swap_percent to be evaluated against the memory threshold
- Add swap_percent default thresholds (warning: 40%, critical: 75%)
- Add zfs_monitor pool capacity default thresholds (warning: 80%, critical: 90%)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Andreas Wrede
2026-05-10 14:03:44 -04:00
parent 9e389736f8
commit ab0132a38d
+9 -1
View File
@@ -79,9 +79,13 @@ THRESHOLD_DEFAULTS = {
}
},
'memory_monitor': {
'percent': {
'memory_percent': {
'warning': 85.0,
'critical': 95.0
},
'swap_percent': {
'warning': 40.0,
'critical': 75.0
}
},
'disk_monitor': {
@@ -114,6 +118,10 @@ THRESHOLD_DEFAULTS = {
'operator': '>',
'hysteresis': 0.0,
'display': 'ZFS pool {pool_name} is {health}'
},
'capacity': {
'warning': 80.0,
'critical': 90.0,
}
}
}