~fnux/matrix-alertmanager-receiver

4e6971b8374339c4b70585fd8e52f4d1ded0b480 — Timothée Floure 6 months ago eeef47e
Refresh README
1 files changed, 37 insertions(+), 6 deletions(-)

M README.md
M README.md => README.md +37 -6
@@ 1,12 1,43 @@
# matrix-alertmanager-receiver

Simple daemon forwarding
Simple daemon - less than 150 lines of Go - forwarding
[prometheus-alertmanager](https://duckduckgo.com/?q=prometheus+alertmanagaer&ia=software)
events to matrix room. While there already is a
[matrix-alertmanager](https://git.feneas.org/jaywink/matrix-alertmanager)
project out there, use of the JavaScript ecosystem (and lack of logging) made
it rather painful to use from my point of view.
project out there, use of the JavaScript ecosystem made it rather painful to
use from my point of view.

See `matrix-alermanager-receiver.scd` for usage. [Go](http://golang.org/) is
required to build the `matrix-alertmanager-receiver` binary, `make` and `scdoc`
(manpage generation) are optional but convenient.
## Build

Make sure you have [Go](https://golang.org/) installed (`golang-bin` package on
Fedora).

```
make getDeps
make build
```

## Usage

Note: you are supposed to expose this service via a proxy such as Nginx,
providing basic HTTP authentication.

```
I (master|✚1) ~/W/f/matrix-alertmanager-receiver » ./matrix-alertmanager-receiver --help
Usage of ./matrix-alertmanager-receiver:
  -config string
    	Path to configuration file (default "/etc/matrix-alertmanager-receiver.toml")
I [2] (master|✚1) ~/W/f/matrix-alertmanager-receiver » cat config.toml
Homeserver = "https://staging.matrix.ungleich.cloud"
TargetRoomID = "!jHFKHemgIAaDJekoxN:matrix-staging.ungleich.ch"
MXID = "@fnux:matrix-staging.ungleich.ch"
MXToken = "secretsecretsecret"
HTTPPort = 9088
I (master|✚1) ~/W/f/matrix-alertmanager-receiver » ./matrix-alertmanager-receiver -config config.toml
2020/05/03 10:50:47 Reading configuration from config.toml.
2020/05/03 10:50:47 Connecting to Matrix Homserver https://staging.matrix.ungleich.cloud as @fnux:matrix-staging.ungleich.ch.
2020/05/03 10:50:47 @fnux:matrix-staging.ungleich.ch is already part of !jHFKHemgIAaDJekoxN:matrix-staging.ungleich.ch.
2020/05/03 10:50:47 Listening for HTTP requests (webhooks) on :9088
2020/05/03 10:50:55 Received valid hook from [::1]:44886
2020/05/03 10:50:55 > FIRING instance example1 is down
```