From ab0132a38db45720c3362159df959befe94e28e1 Mon Sep 17 00:00:00 2001 From: Andreas Wrede Date: Sun, 10 May 2026 14:03:44 -0400 Subject: [PATCH] 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 --- hbd/server/config.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/hbd/server/config.py b/hbd/server/config.py index 7bb3d2e..d6edea6 100644 --- a/hbd/server/config.py +++ b/hbd/server/config.py @@ -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': { @@ -109,11 +113,15 @@ THRESHOLD_DEFAULTS = { 'pools': { '*': { 'status': { - 'warning': 1, - 'critical': 2, + 'warning': 1, + 'critical': 2, 'operator': '>', 'hysteresis': 0.0, 'display': 'ZFS pool {pool_name} is {health}' + }, + 'capacity': { + 'warning': 80.0, + 'critical': 90.0, } } }