Ben Cartwright-Cox e9c2c3801e Fiddle with go.mod to make dockerhub build it?
idk it stopped working with:

---> Running in 74be85315501
1mgo: cannot find main module, but found .git/config in /go/src/mypackage/myapp
to create a module there, run:
go mod init

Removing intermediate container 74be85315501
The command '/bin/sh -c go get -d -v' returned a non-zero code: 1

---
2021-02-25 20:13:59 +00:00
2018-03-28 17:36:17 +01:00

alertmanager-discord

Give this a webhook (with the DISCORD_WEBHOOK environment variable) and point it as a webhook on alertmanager, and it will post your alerts into a discord channel for you as they trigger:

Example alert manager config:

global:
  # The smarthost and SMTP sender used for mail notifications.
  smtp_smarthost: 'localhost:25'
  smtp_from: 'alertmanager@example.org'
  smtp_auth_username: 'alertmanager'
  smtp_auth_password: 'password'

# The directory from which notification templates are read.
templates: 
- '/etc/alertmanager/template/*.tmpl'

# The root route on which each incoming alert enters.
route:
  group_by: ['alertname']
  group_wait: 20s
  group_interval: 5m
  repeat_interval: 3h 
  receiver: discord_webhook

receivers:
- name: 'discord_webhook'
  webhook_configs:
  - url: 'http://localhost:9094'

Docker

If you run a fancy docker/k8s infra, you can find the docker hub repo here: https://hub.docker.com/r/benjojo/alertmanager-discord/

S
Description
Forwards Prometheus AlertManager alerts into Discord
Readme 980 KiB
Languages
Go 87.7%
Shell 6.6%
Go Template 3.6%
Dockerfile 2.1%