From 4e3459bee4ecc8ceef33b0a876e584b494ad4e4a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 21 Jan 2026 23:40:14 +0200 Subject: add OnlyIfNotExists alert suppression feature Adds ability to suppress alerts during maintenance windows by checking for the existence of a file. When the file exists and is recent (within configured max age), matching alerts are excluded from email reports. Features: - Global PrometheusOnlyIfNotExists config for Prometheus alerts - Per-check OnlyIfNotExists config for individual checks - Configurable max age (default 86400s) for suppression file - New "Suppressed alerts" section in email and HTML reports - Suppressed checks excluded from counts and unhandled sections Co-Authored-By: Claude Opus 4.5 --- internal/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/run.go') diff --git a/internal/run.go b/internal/run.go index 348bdd9..9d1b21c 100644 --- a/internal/run.go +++ b/internal/run.go @@ -30,7 +30,7 @@ func Run(ctx context.Context, configFile string, renotify, force bool) { notifyError(conf, err) } - subject, body, doNotify := state.report(renotify, force, conf.StatusPageURL) + subject, body, doNotify := state.report(renotify, force, conf.StatusPageURL, conf) if doNotify { if err := notify(conf, subject, body); err != nil { log.Println("error:", err) -- cgit v1.2.3