I wont fix any issues in this project. Use https://github.com/tmsmr/xmpp-webhook instead!
XMPP-Bot with Webhook for Monitoring Alerts from Prometheus (https://prometheus.io/docs/alerting/alertmanager/).
Prometheus's Alertmanager doesn't support alerting via XMPP/Jabber messages at the moment. Since i want to receive alerts on my mobile devices and i like XMPP, i built this tool.
If you want to use this tool but the description to configure/run is not sufficient, feel free to contact me.
|
| Alertmanager (Webhook receiver)
|
| +------------+
+------------>| webhook.py |---+
+------------+ |
|
| POSIX IPC MQ
|
+------------+ |
+-------------| xmppbot.py |<--+
| +------------+
|
| XMPP Messages
|
Receives the Alerts from Promtheus via Webhook and pushes them into a POSIX IPC MQ.
- For testing purposes you can start this script with python. Simply call:
python webhook.py
- For 'production use' start the flask app with gunicorn:
gunicorn -w 5 -b 0.0.0.0:8080 webhook:service
Pulls the Alerts from the POSIX IPC MQ and sends them to the configured XMPP recipients.
- Start the XMPP bot with:
python xmppbot.py
- Both components can be configured in the configuration file
conf.json
pip install flask
pip install gunicorn
pip install sleekxmpp
apt-get install build-essential python-dev
pip install posix_ipc
- Tip: I use
supervisord
to run that kind of script automatically at boot.