Fix alertmanager mails

certbot_on_virtu
Alexandre Iooss 2019-04-26 10:59:13 +02:00
parent 84c3d66811
commit 528e443d67
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
3 changed files with 23 additions and 3 deletions

View File

@ -12,8 +12,14 @@
- fy.adm.crans.org:9100
- vulcain.adm.crans.org:9100
# VM
- dhcp.adm.crans.org:9100
- nem.adm.crans.org:9100
- kenobi.adm.crans.org:9100
- roundcube-srv.adm.crans.org:9100
- kiwi.adm.crans.org:9100
- eap.adm.crans.org:9100
- radius.adm.crans.org:9100
- frontdaur.adm.crans.org:9100
- gitzly.adm.crans.org:9100
- ethercalc-srv.adm.crans.org:9100
- ipv6-zayo.adm.crans.org:9100
- prometheus.adm.crans.org:9100

View File

@ -2,10 +2,11 @@
global:
# The smarthost and SMTP sender used for mail notifications.
smtp_smarthost: 'localhost:25'
smtp_from: 'alertmanager@crans.org'
smtp_smarthost: 'smtp.adm.crans.org:25'
smtp_from: 'roots@crans.org'
#smtp_auth_username: 'alertmanager'
#smtp_auth_password: 'password'
smtp_require_tls: false
# The directory from which notification templates are read.
templates:

View File

@ -0,0 +1,13 @@
# {{ ansible_managed }}
{# As this is also Jinja2 it will conflict without a raw block #}
{% raw %}
ALERT InstanceDown
IF up == 0
FOR 5m
LABELS { severity = "page" }
ANNOTATIONS {
summary = "Instance {{ $labels.instance }} down",
description = "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes.",
}
{% endraw %}