/alert-bot

Broadcasts alerts

Primary LanguageJava

Alert-bot

Build Status

This is alert bot for Wire.

Prometheus Alert manager config

...

receivers:
  - name: 'alertbot'
    webhook_configs:
    - url: https://services.wire.com/alert/prometheus
      send_resolved: true
      http_config:
          bearer_token: '$ALERT_PROMETHEUS_TOKEN'
          tls_config:
            insecure_skip_verify: true
...

How to trigger a Prometheus alert manually

curl 'localhost:8080/alert/prometheus' \
    -H "Authorization:Bearer $ALERT_PROMETHEUS_TOKEN" \
    -H "Content-Type:Application/Json" \
    -d @examples/prometheus.json

How to trigger a Simple alert manually

curl 'localhost:8080/alert/simple/$BOT_ID' \
    -H "Content-Type:Application/Json" \
    -d '{ "message" : "This is just a test" }'

How to trigger a Simple broadcast manually

curl 'localhost:8080/alert/broadcast' \
    -H "Authorization:Bearer $ALERT_PROMETHEUS_TOKEN" \
    -H "Content-Type:Application/Json" \
    -d '{ "message" : "This is just a test" }'

How the rendered alerts look like

Wire Desktop

How to filter out alerts

/label add service ibis

This will make that only warnings that contain label service=ibis would be displayed

/label remove service ibis

Whitelist users that can receive alerts

comma separated list of Wire usernames in whitelist in the config. Leave the list empty if you want to allow everybody to join.