diff options
| author | Paul Buetow <paul@buetow.org> | 2026-01-21 23:40:14 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-01-21 23:40:14 +0200 |
| commit | 4e3459bee4ecc8ceef33b0a876e584b494ad4e4a (patch) | |
| tree | 3cd76c41bef90f8ccc9d5fda8b8031b0f9281c03 /internal/run.go | |
| parent | 64c4f058e6f9975effb38e952531458054f512c3 (diff) | |
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 <noreply@anthropic.com>
Diffstat (limited to 'internal/run.go')
| -rw-r--r-- | internal/run.go | 2 |
1 files changed, 1 insertions, 1 deletions
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) |
