Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xmppo/xmpp-webhook
Multipurpose XMPP-Webhook (Built for DevOps Alerts)
https://github.com/xmppo/xmpp-webhook
alerting grafana jabber notifications prometheus slack xmpp
Last synced: 26 days ago
JSON representation
Multipurpose XMPP-Webhook (Built for DevOps Alerts)
- Host: GitHub
- URL: https://github.com/xmppo/xmpp-webhook
- Owner: xmppo
- License: mit
- Created: 2017-09-24T11:57:48.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-14T17:58:25.000Z (10 months ago)
- Last Synced: 2024-09-28T15:41:05.668Z (about 1 month ago)
- Topics: alerting, grafana, jabber, notifications, prometheus, slack, xmpp
- Language: Go
- Homepage: https://github.com/xmppo/xmpp-webhook
- Size: 71.3 KB
- Stars: 21
- Watchers: 4
- Forks: 8
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xmpp-webhook
- Multipurpose XMPP-Webhook (Built for DevOps Alerts)
- Based on https://github.com/mellium/xmpp## Status
`xmpp-webhook` currently support:- Grafana Webhook alerts
- Alertmanager Webhooks
- Slack Incoming Webhooks (Feedback appreciated)Check https://github.com/tmsmr/xmpp-webhook/blob/master/parser/ to learn how to support more source services.
## Usage
- `xmpp-webhook` is configured via environment variables:
- `XMPP_ID` - The JID we want to use
- `XMPP_PASS` - The password
- `XMPP_RECIPIENTS` - Comma-separated list of JID's
- `XMPP_SKIP_VERIFY` - Skip TLS verification (Optional)
- `XMPP_OVER_TLS` - Use dedicated TLS port (Optional)
- `XMPP_WEBHOOK_LISTEN_ADDRESS` - Bind address (Optional)
- After startup, `xmpp-webhook` tries to connect to the XMPP server and provides the implemented HTTP enpoints. e.g.:```
curl -X POST -d @dev/grafana-webhook-alert-example.json localhost:4321/grafana
curl -X POST -d @dev/alertmanager-example.json localhost:4321/alertmanager
curl -X POST -d @dev/slack-compatible-notification-example.json localhost:4321/slack
```
- After parsing the body in the appropriate `parserFunc`, the notification is then distributed to the configured recipients.## Run with Docker
### Build it
- Build image: `docker build -t xmpp-webhook .`
- Run: `docker run -e "[email protected]" -e "XMPP_PASS=xxx" -e "[email protected],[email protected]" -p 4321:4321 -d --name xmpp-webhook xmpp-webhook`
### Use prebuilt image from Docker Hub
- Run: `docker run -e "[email protected]" -e "XMPP_PASS=xxx" -e "[email protected],[email protected]" -p 4321:4321 -d --name xmpp-webhook tmsmr/xmpp-webhook:latest`## Installation
- Download and extract the latest tarball (GitHub release page)
- Install the binary: `install -D -m 744 xmpp-webhook /usr/local/bin/xmpp-webhook`
- Install the service: `install -D -m 644 xmpp-webhook.service /etc/systemd/system/xmpp-webhook.service`
- Configure XMPP credentials in `/etc/xmpp-webhook.env`. e.g.:```
XMPP_ID='[email protected]'
XMPP_PASS='passw0rd'
XMPP_RECIPIENTS='[email protected],[email protected]'
```- Enable and start the service:
```
systemctl daemon-reload
systemctl enable xmpp-webhook
systemctl start xmpp-webhook
```## Building
- Dependencies are managed via Go Modules (https://github.com/golang/go/wiki/Modules).
- Clone the sources
- Change in the project folder:
- Build `xmpp-webhook`: `go build`
- `dev/xmpp-dev-stack` starts Prosody (With "auth_any" and "roster_allinall" enabled) and two XMPP-clients for easy testing## Need help?
Feel free to contact me!