RousselTMLEARNING

← Back to the forum · 📚 Questions about courses

Alertmanager : envoyer les alertes critiques à l'astreinte et le reste sur Slack

✓ Solved 📚 Alertmanager and alert management: from discovery to expertise

  1. Aujourd'hui toutes nos alertes partent dans un canal Slack et plus personne ne les lit. Comment router seulement les critiques vers l'astreinte ?

    👍 0
  2. ✓ Accepted answer

    Avec l'arbre de routage : la première route qui correspond gagne (sauf continue: true).

    route:
      receiver: slack-equipe
      group_by: [alertname, service]
      group_wait: 30s
      group_interval: 5m
      repeat_interval: 4h
      routes:
        - matchers: [severity="critical"]
          receiver: astreinte
          repeat_interval: 1h
        - matchers: [severity="info"]
          receiver: "null"
    receivers:
      - name: slack-equipe
        slack_configs: [{ channel: "#alertes", send_resolved: true }]
      - name: astreinte
        pagerduty_configs: [{ routing_key: "<clé>" }]
      - name: "null"
    flowchart TB
      A[Alerte] --> C{severity}
      C -->|critical| P[Astreinte PagerDuty]
      C -->|info| N[Ignorée]
      C -->|autre| S[Slack #alertes]

    Testez sans rien envoyer : amtool config routes test --config.file=alertmanager.yml severity=critical service=api.

    👍 0

Reply

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!