From 1f20bed4e77d2238e2b613b060fd05adb58ba116 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 18 Jan 2026 16:39:11 +0200 Subject: exclude OK status from stale alerts report Stale OK alerts are not concerning and shouldn't clutter the stale alerts section. Only report stale alerts with warning/critical/unknown status. Co-Authored-By: Claude Opus 4.5 --- internal/state.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/state.go') diff --git a/internal/state.go b/internal/state.go index d71c71c..516e63a 100644 --- a/internal/state.go +++ b/internal/state.go @@ -214,8 +214,9 @@ func (s state) reportUnhandled(sb *strings.Builder) (numCriticals, numWarnings, } func (s state) reportStaleAlerts(sb *strings.Builder) int { + // Only report stale alerts that are not OK, since stale OK alerts aren't concerning return s.reportBy(sb, false, true, func(cs checkState) bool { - return cs.Epoch < s.staleEpoch + return cs.Epoch < s.staleEpoch && cs.Status != nagiosOk }) } -- cgit v1.2.3