Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

XMPP-Bot with Webhook for Monitoring Alerts from Prometheus.

License

Notifications You must be signed in to change notification settings

tmsmr/prometheus-xmpp-alerts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATION NOTICE

I wont fix any issues in this project. Use https://github.com/tmsmr/xmpp-webhook instead!

prometheus-xmpp-alerts

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.

How it works

|
| Alertmanager (Webhook receiver)
|
|             +------------+
+------------>| webhook.py |---+
              +------------+   |
                               |
                               | POSIX IPC MQ
                               |
              +------------+   |
+-------------| xmppbot.py |<--+
|             +------------+
|
| XMPP Messages
|

webhook.py

Receives the Alerts from Promtheus via Webhook and pushes them into a POSIX IPC MQ.

Start

  • 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

xmppbot.py

Pulls the Alerts from the POSIX IPC MQ and sends them to the configured XMPP recipients.

Start

  • Start the XMPP bot with: python xmppbot.py

Configuration

  • Both components can be configured in the configuration file conf.json

Dependencies (Package names for Debian)

  • pip install flask
  • pip install gunicorn
  • pip install sleekxmpp
  • apt-get install build-essential python-dev
  • pip install posix_ipc

Run in 'production'

  • Tip: I use supervisord to run that kind of script automatically at boot.

About

XMPP-Bot with Webhook for Monitoring Alerts from Prometheus.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages