# ============================================================================= # Alertmanager config (TASK-0135, phase-15) # # Routing by severity: # page → webhook (the platform's OWN incoming-webhook automation — the # self-dogfood: an automation that posts to the admin channel) # + email (the ops mailbox; the production path is the nodemailer # email queue, per the spec — the SMTP receiver here is the direct # equivalent for a plain cluster) # warn → email only (webhook is page-only, per the spec) # # repeat_interval: 4h (the spec). # # PLACEHOLDERS — replace before staging apply: # 1. `ALERT_WEBHOOK_URL`: the platform's incoming-webhook endpoint. The # value below is the documented self-dogfood URL pattern; substitute the # real per-environment webhook (it is environment-specific and would be # injected via the alertmanager Secret in production). # 2. `ALERT_EMAIL_TO` + the smtp block: ops@ai-software-factory.com is the # on-call mailbox placeholder; wire the real SMTP relay (host/port/ # credentials via Secret — never in this file). # ============================================================================= global: resolve_timeout: 5m smtp_smarthost: "smtp.example.com:587" # REPLACE: the real SMTP relay smtp_from: "factory-alerts@ai-software-factory.com" smtp_require_tls: true # smtp_auth_username / smtp_auth_password come from the alertmanager # Secret (created out-of-band, like factory-secrets) — not here. route: receiver: ops-email repeat_interval: 4h group_by: [alertname, severity] group_wait: 30s group_interval: 5m routes: - matchers: - severity = page receiver: page-webhook-email repeat_interval: 4h - matchers: - severity = warn receiver: ops-email repeat_interval: 4h receivers: # page: the platform's own incoming-webhook automation (self-dogfood) + email. - name: page-webhook-email webhook_configs: - url: "https://platform.ai-software-factory.com/api/v1/webhooks/incoming/obs" # REPLACE: per-environment webhook send_resolved: true max_alerts: 100 email_configs: - to: "ops@ai-software-factory.com" # REPLACE: the on-call mailbox send_resolved: true headers: Subject: '[FIRE] {{ .GroupLabels.alertname }} ({{ .CommonLabels.severity }})' # warn / default: email only. - name: ops-email email_configs: - to: "ops@ai-software-factory.com" # REPLACE: the on-call mailbox send_resolved: true headers: Subject: '[WARN] {{ .GroupLabels.alertname }}' inhibit_rules: # A page suppresses its own warn for the same target (the page already # carries the context; the warn would be noise on the same pod/queue). - source_matchers: - severity = page target_matchers: - severity = warn equal: [queue, instance]