2022-10-13 13:41:35 +02:00
|
|
|
# [ntfy-alertmanager]
|
|
|
|
|
2022-10-19 13:34:35 +02:00
|
|
|
[![builds.sr.ht status](https://builds.xenrox.net/~xenrox/ntfy-alertmanager/commits/master.svg)](https://builds.xenrox.net/~xenrox/ntfy-alertmanager/commits/master?)
|
|
|
|
|
2022-10-13 13:41:35 +02:00
|
|
|
A bridge between ntfy and Alertmanager.
|
|
|
|
|
2022-10-20 14:18:22 +02:00
|
|
|
## Installation
|
|
|
|
|
|
|
|
Simply use go build or the [docker image] with [docker-compose file].
|
2023-01-14 21:26:57 +01:00
|
|
|
`ntfy-alertmanager:latest` is built from the latest tagged release while
|
|
|
|
`ntfy-alertmanager:dev` is built from the master branch.
|
2023-07-20 01:59:08 +02:00
|
|
|
On Arch Linux you can install the [aur package] as well.
|
2022-10-20 14:18:22 +02:00
|
|
|
|
2022-10-13 13:41:35 +02:00
|
|
|
## Configuration
|
|
|
|
|
|
|
|
You can specify the configuration file location with the `--config` flag. By default
|
|
|
|
the configuration file will be read from `/etc/ntfy-alertmanager/config`. The format
|
2023-07-19 15:17:36 +02:00
|
|
|
of this file is [scfg] and there is an [example configuration file] in this repo.
|
|
|
|
Furthermore you can take a look at [my deployment].
|
2022-10-13 13:41:35 +02:00
|
|
|
|
2023-03-09 17:02:05 +01:00
|
|
|
ntfy-alertmanager has support for setting ntfy [priority], [tags], [icon], [action buttons]
|
2023-07-07 21:37:11 +02:00
|
|
|
(which can be used to create an Alertmanager silence), [email notifications] and [phone calls].
|
2023-03-09 17:02:05 +01:00
|
|
|
Define a decreasing order of labels in the config file and map those labels to tags, priority, an icon or an email address.
|
2022-10-13 13:41:35 +02:00
|
|
|
|
2023-02-20 13:08:59 +01:00
|
|
|
- For priority and icon the first found value will be chosen. An icon for "resolved" alerts will take precedence.
|
2022-10-13 13:41:35 +02:00
|
|
|
- Tags are added together.
|
|
|
|
|
|
|
|
### Alertmanager config
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
receivers:
|
|
|
|
- name: "ntfy"
|
|
|
|
webhook_configs:
|
|
|
|
- url: "http://127.0.0.1:8080"
|
|
|
|
http_config:
|
|
|
|
basic_auth:
|
|
|
|
username: "webhookUser"
|
|
|
|
password: "webhookPass"
|
|
|
|
```
|
|
|
|
|
|
|
|
## Contributing
|
|
|
|
|
2023-03-09 13:27:52 +01:00
|
|
|
Report bugs on the [issue tracker], send patches/ask questions on the [mailing list]
|
|
|
|
or write to me directly on matrix [@xenrox:xenrox.net].
|
2022-10-13 13:41:35 +02:00
|
|
|
|
|
|
|
[ntfy-alertmanager]: https://hub.xenrox.net/~xenrox/ntfy-alertmanager/
|
|
|
|
[scfg]: https://git.sr.ht/~emersion/scfg
|
|
|
|
[priority]: https://ntfy.sh/docs/publish/#message-priority
|
|
|
|
[tags]: https://ntfy.sh/docs/publish/#tags-emojis
|
2023-02-20 13:08:59 +01:00
|
|
|
[icon]: https://docs.ntfy.sh/publish/#icons
|
|
|
|
[action buttons]: https://docs.ntfy.sh/publish/#action-buttons
|
2023-03-09 17:02:05 +01:00
|
|
|
[email notifications]: https://docs.ntfy.sh/publish/#e-mail-notifications
|
2023-07-07 21:37:11 +02:00
|
|
|
[phone calls]: https://ntfy.xenrox.net/docs/publish/#phone-calls
|
2022-10-13 13:41:35 +02:00
|
|
|
[issue tracker]: https://todo.xenrox.net/~xenrox/ntfy-alertmanager
|
2023-03-09 13:27:52 +01:00
|
|
|
[mailing list]: https://lists.xenrox.net/~xenrox/public-inbox
|
|
|
|
[@xenrox:xenrox.net]: https://matrix.to/#/@xenrox:xenrox.net
|
2022-10-20 14:18:22 +02:00
|
|
|
[docker image]: https://hub.docker.com/r/xenrox/ntfy-alertmanager
|
|
|
|
[docker-compose file]: https://git.xenrox.net/~xenrox/ntfy-alertmanager/tree/master/item/docker/docker-compose.yml
|
2023-07-19 15:17:36 +02:00
|
|
|
[example configuration file]: https://git.xenrox.net/~xenrox/ntfy-alertmanager/tree/master/item/config.scfg
|
|
|
|
[my deployment]: https://git.xenrox.net/~xenrox/ansible/tree/master/item/roles/alertmanager/templates/ntfy-alertmanager.j2
|
2023-07-20 01:59:08 +02:00
|
|
|
[aur package]: https://aur.archlinux.org/packages/ntfy-alertmanager
|