mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-10 05:18:33 +01:00
feat: icinga mail notifications
This commit is contained in:
25
roles/monitoring-master/templates/mail_notifications.conf
Normal file
25
roles/monitoring-master/templates/mail_notifications.conf
Normal file
@@ -0,0 +1,25 @@
|
||||
apply Notification "mail-icingaadmin" to Host {
|
||||
import "mail-host-notification"
|
||||
|
||||
user_groups = host.vars.notification.mail.groups
|
||||
users = host.vars.notification.mail.users
|
||||
|
||||
interval = 2h
|
||||
|
||||
vars.notification_logtosyslog = true
|
||||
vars.notification_from = "Icinga <{{ smtp_service_user }}@atlantishq.de>"
|
||||
|
||||
assign where host.vars.notification.mail
|
||||
}
|
||||
|
||||
apply Notification "mail-icingaadmin" to Service {
|
||||
import "mail-service-notification"
|
||||
|
||||
user_groups = host.vars.notification.mail.groups
|
||||
users = host.vars.notification.mail.users
|
||||
|
||||
interval = 2h
|
||||
vars.notification_logtosyslog = true
|
||||
vars.notification_from = "Icinga <{{ smtp_service_user }}@atlantishq.de>"
|
||||
assign where host.vars.notification.mail
|
||||
}
|
||||
13
roles/monitoring-master/templates/postfix_main.cf
Normal file
13
roles/monitoring-master/templates/postfix_main.cf
Normal file
@@ -0,0 +1,13 @@
|
||||
# Set username and password
|
||||
smtp_sasl_password_maps = static:{{ smtp_service_user }}:{{ smtp_service_pass }}
|
||||
smtp_sasl_security_options = noanonymous
|
||||
|
||||
# Turn on tls encryption
|
||||
# smtp_tls_security_level = encrypt
|
||||
header_size_limit = 4096000
|
||||
|
||||
# Set external SMTP relay host here IP or hostname accepted along with a port number.
|
||||
relayhost = {{ smtp_internal_host }}:25
|
||||
|
||||
# accept email from our web-server only (adjust to match your VPC/VLAN etc)
|
||||
inet_interfaces = 127.0.0.1
|
||||
Reference in New Issue
Block a user