summaryrefslogtreecommitdiff
path: root/internal/state.go
diff options
context:
space:
mode:
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)