057b2e15f6
From Go 1.21 release notes[1]: New slices package for common operations on slices of any element type. This includes sorting functions that are generally faster and more ergonomic than the sort package. [1]: https://go.dev/blog/go1.21 |
||
---|---|---|
cache | ||
config | ||
docker | ||
.build.yml | ||
.gitignore | ||
config.scfg | ||
functions.go | ||
go.mod | ||
go.sum | ||
http.go | ||
LICENSE | ||
main.go | ||
README.md | ||
silence.go |
ntfy-alertmanager
A bridge between ntfy and Alertmanager.
Installation
Simply use go build or the docker image with docker-compose file.
ntfy-alertmanager:latest
is built from the latest tagged release while
ntfy-alertmanager:dev
is built from the master branch.
On Arch Linux you can install the aur package as well.
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
of this file is scfg and there is an example configuration file in this repo.
Furthermore you can take a look at my deployment.
ntfy-alertmanager has support for setting ntfy priority, tags, icon, action buttons (which can be used to create an Alertmanager silence), email notifications and phone calls. Define a decreasing order of labels in the config file and map those labels to tags, priority, an icon or an email address.
- For priority and icon the first found value will be chosen. An icon for "resolved" alerts will take precedence.
- Tags are added together.
Alertmanager config
receivers:
- name: "ntfy"
webhook_configs:
- url: "http://127.0.0.1:8080"
http_config:
basic_auth:
username: "webhookUser"
password: "webhookPass"
Contributing
Report bugs on the issue tracker, send patches/ask questions on the mailing list or write to me directly on matrix @xenrox:xenrox.net.