A docker-compose-based basic configuration of Prometheus + Alertmanager + Alertmanager Telegram bot.
Probes http/s endpoints to ensure the are up, issues alerts if gets anything except 2xx, sends these to telegram.
- Clone the repo
- Make changes to the config/prometheus.yml - replace endpoints to monitor (http and https) with your own ones (look for targets:)
- Copy .env_ to .env
- Set your Telegram user ID and the token of your Telegram bot in .env
- Procure a machine with docker and docker-compose
- mkdir /var/monitoring, mkdir /var/alertbotdata on the machine
- Drop repo files to /var/monitoring
- cd /var/monitoring
- docker-compose pull && docker-compose up -d
- Verify Prometheus GUI is available on http://host:9090 and Alertmanager on http://host:9093
- Kill one of your sites and check that you see the alert both in Alertmanager GUI and in Telegram
- Optionally create a bare git repo on the machine and drop in the provided post-receive hook to enable updates through git push
- Currently update through git hook is done by restarting the containers - could just force them to reload the configs