From da045ab09357a556bae7fbebabb3d91656219ee6 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Fri, 27 Nov 2026 00:09:40 -0500 Subject: [PATCH] monitoring(alertmanager): enable an alert sink and wire the 33 PrometheusRules (F5) Alertmanager was disabled in values.yaml, so every PrometheusRule on the cluster evaluated into nothing: 5 alerts were firing at audit time, including PrometheusNotConnectedToAlertmanagers. - alertmanager.enabled: true, 1 replica pinned to siriussec, small resource caps, operator mounts Secret monitoring/alertmanager-telegram (created out of band; never in git). - Receiver: Telegram @Siriusdevops_alert_bot chat 7528130947. This is the dedicated alert bot, NOT the Hermes gateway bot, so alerts cannot loop back into the agent. - Routing: default -> telegram; Watchdog and InfoInhibitor -> null blackhole (Watchdog fires forever by design), severity=info -> null. Chart-default inhibit_rules kept. - Prometheus alerting is generated by the chart from alertmanager.enabled, so prometheus.spec.alerting now points at the new StatefulSet/Service. - Retention untouched: 7d / 8GB. --- monitoring/controllers/home/values.yaml | 77 ++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/monitoring/controllers/home/values.yaml b/monitoring/controllers/home/values.yaml index 1dae79c..f0e5df9 100644 --- a/monitoring/controllers/home/values.yaml +++ b/monitoring/controllers/home/values.yaml @@ -5,9 +5,82 @@ # Prometheus is capped twice (time AND bytes) so a metrics burst can never # repeat the ephemeral-storage / DiskPressure incident (see docs/cluster-overview.md). -# --- Alertmanager: off. No receivers in this card; alerts fire to nowhere on purpose. +# --- Alertmanager: ON. It is the cluster's only alert sink; without it the +# 33 PrometheusRules evaluate into nothing (finding F5). The receiver is the +# dedicated alert bot @Siriusdevops_alert_bot (chat 7528130947) — the same bot +# the public contact forms use and deliberately NOT the Hermes gateway bot the +# agent/netsec waker runs on, so a cluster alert can never loop back into the +# agent. The bot token is NOT in git: it lives in Secret +# monitoring/alertmanager-telegram (created out of band) and the operator +# mounts it at /etc/alertmanager/secrets/alertmanager-telegram/bot_token. +# +# Routing: default -> telegram. Watchdog (fires forever by design, the +# dead-man's switch) and the InfoInhibitor meta-alert go to the 'null' +# blackhole receiver so neither ever pages; info-severity noise (e.g. +# CPUThrottlingHigh) stays in Prometheus/Grafana without paging. That route is +# the durable silence — unlike an Alertmanager API silence it lives in git and +# survives a pod reschedule. The inhibit_rules are the chart defaults (critical +# inhibits warning/info, warning inhibits info) and are kept as-is. alertmanager: - enabled: false + enabled: true + apiVersion: v2 + alertmanagerSpec: + nodeSelector: + kubernetes.io/hostname: siriussec + resources: + requests: + cpu: 20m + memory: 32Mi + limits: + cpu: 200m + memory: 128Mi + # Mounts Secret monitoring/alertmanager-telegram into the pod at + # /etc/alertmanager/secrets/alertmanager-telegram/ (bot_token key). + secrets: + - alertmanager-telegram + config: + global: + resolve_timeout: 5m + route: + group_by: ['namespace'] + group_wait: 30s + group_interval: 5m + repeat_interval: 12h + receiver: 'telegram' + routes: + - matchers: ['alertname = "Watchdog"'] + receiver: 'null' + - matchers: ['alertname = "InfoInhibitor"'] + receiver: 'null' + - matchers: ['severity = "info"'] + receiver: 'null' + inhibit_rules: + - source_matchers: ['severity = "critical"'] + target_matchers: ['severity =~ "warning|info"'] + equal: ['namespace', 'alertname'] + - source_matchers: ['severity = "warning"'] + target_matchers: ['severity = "info"'] + equal: ['namespace', 'alertname'] + - source_matchers: ['alertname = "InfoInhibitor"'] + target_matchers: ['severity = "info"'] + equal: ['namespace'] + - target_matchers: ['alertname = "InfoInhibitor"'] + receivers: + - name: 'null' + - name: 'telegram' + telegram_configs: + - bot_token_file: /etc/alertmanager/secrets/alertmanager-telegram/bot_token + chat_id: 7528130947 + send_resolved: true + parse_mode: HTML + message: |- + {{ range .Alerts -}} + {{ if eq .Status "firing" }}FIRING{{ else }}RESOLVED{{ end }} [{{ .Labels.severity }}] {{ .Labels.alertname }} + {{ .Annotations.summary }} + {{ .Annotations.description }} + {{ end }} + templates: + - '/etc/alertmanager/config/*.tmpl' defaultRules: create: true