diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-16 21:34:59 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-16 21:34:59 +0200 |
| commit | e0b58e617a17ec60570d67e11c5ffb6b6173f973 (patch) | |
| tree | f6a4e22af13cc0a03b0af326ffae2cc3341eeede /internal/state.go | |
| parent | 81db39feafdc491658f8a10dc604be851a533ffc (diff) | |
fix: show OK checks regardless of stalenessv1.4.1
The staleness filter was incorrectly hiding stale OK checks from the
HTML report and email notifications. OK checks should always be shown
since stale OK alerts are not concerning.
Diffstat (limited to 'internal/state.go')
| -rw-r--r-- | internal/state.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/state.go b/internal/state.go index e33d5cb..940cbec 100644 --- a/internal/state.go +++ b/internal/state.go @@ -288,8 +288,8 @@ func (s state) reportBy(sb *strings.Builder, showStatusChange, isStaleReport boo if !filter(cs) { continue } - if !isStaleReport && cs.Epoch < s.staleEpoch { - continue // skip stale checks in non-stale report + if !isStaleReport && cs.Epoch < s.staleEpoch && cs.Status != nagiosOk { + continue // skip stale non-OK checks in non-stale report } if cs.Status != nagiosOk && isCheckSuppressed(name, conf) { continue // skip suppressed checks (OK checks are never suppressed) |
