
object NotificationCommand "Service Alarm By Email" { import "plugin-notification-command" command = [ "/etc/icinga2/scripts/service-by-mail.sh" ] arguments += { "-4" = { required = true value = "$address$" } "-6" = "$address6$" "-b" = "$notification.author$" "-c" = "$notification.comment$" "-d" = { required = true value = "$icinga.long_date_time$" } "-e" = { required = true value = "$service.name$" } "-f" = "$notification_from$" "-i" = "$icingaweb2url$" "-l" = { required = true value = "$host.name$" } "-n" = { required = true value = "$host.display_name$" } "-o" = { required = true value = "$service.output$" } "-r" = { required = true value = "$user.email$" } "-s" = { required = true value = "$service.state$" } "-t" = "$notification.type$" "-u" = { required = true value = "$service.display_name$" } "-v" = "$notification_logtosyslog$" } }
1 Comment
Hi there,
I’m having some trouble implementing this. I have followed your guide step by step yet I still am unable to receive email notifications.
Please assist me!
Thank you.