Interview Prep/Monitoring & Observability/Observability as Code, Security & Vendor Choices

How do you validate Alertmanager configuration in CI?

BeginnerProductionObservability as Code, Security & Vendor Choices
Answer

Two checks with amtool: syntax and routing behaviour.

amtool check-config alertmanager.yml
amtool config routes show --config.file=alertmanager.yml
amtool config routes test --config.file=alertmanager.yml \
  severity=critical team=payments          # prints the receiver that would get it

We keep a small table of label sets and expected receivers in the repo and fail the pipeline when routes test output differs. That catches the classic bug of a new route placed below a catch-all with no continue.

All Monitoring & Observability questions

More on Observability as Code, Security & Vendor Choices