- Rust 96.8%
- Go Template 2.6%
- Shell 0.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| build-helpers | ||
| src | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Containerfile.alpine | ||
| COPYING | ||
| README.md | ||
mawby -- Matrix Alertmanager Webhook Bot? Yes!
Running
The easiest way right now is to use the container packaging. Builds are
automatically uploaded to quay.io/upto/mawby. Three label types are
available:
latest: Latest stable versionmaster: Latest version from the master branch<version, such as v0.1.0>: Static version
Inside the container, mawby is running as an unprivileged user (mawby,
uid/gid 9823/9823). By default, the configuration is read from
/etc/mawby/mawby.conf, and it requires a writeable data directory at
/var/lib/mawby (possible to change in the configuration). The default
listening port is 9823, unless overriden by configuration.
To print a commented configuration template, run the application (or the
container) with the argument --print-config-template.
Using
mawby expects WebhookV4 alerts to be posted to /alerts/<endpoint name>. Using
the routing statements, this alert will be routed to the expected room. For
example, with this alertmanager.yml fragment:
receivers:
- name: service_a
webhook_configs:
- url: http://<mawby-host>:9823/alerts/service_a
And this mawby.yaml fragment:
rooms:
team1: '#team1:example.org'
routes:
service_a:
room: team1
Alerts that are routed to the service_a receiver in alertmanager will end up
in #team1:example.org. Since routing on labels and annotations is fully
supported by alertmanager, mawby takes a more simplistic approach to routing
and only supports routing between endpoints and rooms.
See https://forge.upto.se/mawby/mawby/src/branch/master/src/files/mawby.sample.yaml for a complete mawby configuration.