summaryrefslogtreecommitdiff
path: root/internal/state.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-08 10:57:45 +0200
committerPaul Buetow <paul@buetow.org>2026-02-08 10:57:45 +0200
commit81db39feafdc491658f8a10dc604be851a533ffc (patch)
tree9f84bcaaaef120520ebfc9823f0807abaadcd858 /internal/state.go
parent9c78a3666eddf3a6a3b82581e0353665aa3f6320 (diff)
feat: add peer failover alertingv1.4.0
Introduce peer URL monitoring with active/passive alert suppression, skip checks when passive, and bump version to v1.4.0. Co-authored-by: Cursor <cursoragent@cursor.com>
Diffstat (limited to 'internal/state.go')
-rw-r--r--internal/state.go17
1 files changed, 16 insertions, 1 deletions
diff --git a/internal/state.go b/internal/state.go
index b9631b4..e33d5cb 100644
--- a/internal/state.go
+++ b/internal/state.go
@@ -133,10 +133,25 @@ func (s state) persist() error {
// report generates the notification email content.
// statusPageURL is included as a link to the HTML status page.
// conf is used to determine which checks should be suppressed from the report.
-func (s state) report(renotify, force bool, statusPageURL string, conf config) (string, string, bool) {
+func (s state) report(
+ renotify, force bool,
+ statusPageURL string,
+ conf config,
+ passive bool,
+ passiveReason string,
+) (string, string, bool) {
var sb strings.Builder
sb.WriteString("This is the recent Gogios report!\n\n")
+ if passive {
+ sb.WriteString("NOTE: Passive mode active, checks were skipped.\n")
+ if passiveReason != "" {
+ sb.WriteString("Reason: ")
+ sb.WriteString(passiveReason)
+ sb.WriteString("\n")
+ }
+ sb.WriteString("\n")
+ }
sb.WriteString("# Alerts with status changed:\n\n")
changed := s.reportChanged(&sb, conf)