MU
multani/lab-alertmanager
A small lab to start Prometheus + alertmanager
🧪 Lab: Alertmanager
This runs Prometheus + Alertmanager with a set of:
- Prometheus:
- Aggressive configuration to scrape and trigger alerts quickly
- Some basic alerting rules to start/stop alerts easily
- Alertmanager:
- A basic alert routing tree + inhibition + receivers
- A few basic templates to send alerts to Slack and console
Run with Docker Compose
In the compose folder, run:
cd compose
docker compose up -dTo read the changes on the configuration, rules, templates, etc., run:
docker compose kill --signal=HUP alertmanager prometheusTo see the alert payload received by Alertmanager, look at the logs of the webhook logger:
docker compose logs -f webhook-loggerSlack receiver
To receive notifications on Slack, you will need to have a Slack app and get its OAuth token.
- Login to your Slack workspace
- Build a new Slack app "from scratch" from: https://api.slack.com/apps/
- In the application configuration:
- Open the OAuth & Permissions page
- Scroll down to Scopes and add the
chat:write.publicscope - Scroll to the top and click on Install to Workspace and follow the instructions
- Copy the Bot User OAuth Token into a file in
compose/alertmanager/secrets/slack-app-token.secret