Alertmanager는 Prometheus 같은 클라이언트로부터 alert를 받아 처리하는 서버이다. Alert 중복 제거, 그룹핑을 하고 최종적으로email이나 webhook, slack 등의 receiver 로 라우팅 처리를 하여 사용자가 가공된 alert message를 받아 볼 수 있게한다.

Alertmanager 의 구조

Untitled

이미지 출처: https://github.com/prometheus/alertmanager#architecture

Alert 발생시 전체 흐름 요약

Untitled

이미지 출처: https://training.promlabs.com/training/alerting-with-prometheus/alertmanager-overview/notification-pipeline

  1. HTTP API 핸들러를 통해서 들어온 Alert은 저장소에 저장된다.
  2. 이후 해당 Alert 과 match 되는 route 를 찾고 grouping 설정에 따라 특정 시간 단위로 Alert 을 grouping 하여 Notifier(pipeline) 에게 보낸다.
  3. Notifier(pipeline) 은 여러개의 stage 로 나뉘는데 각 stage 를 순차적으로 실행하면서 muted 되거나 silienced 된 Alert 을 filtering 하고 중복을 제거 한후 최종적으로 여러 receiver 로 Alert 을 전송한다.

Alertmanager 의 HA 구성

Untitled

이미지 출처: https://promcon.io/2017-munich/slides/alertmanager-and-high-availability.pdf