I have notifications setup to email out. I can manually send mail from the command line using the mail-host-notification.sh script and specifying the arguments. Also using the variables work. When sending from the console, or notifications send, the email sends successfully, but is essentially blank.
icinga2 feature list
Disabled features: command compatlog elasticsearch gelf icingadb influxdb influxdb2 livestatus opentsdb statusdata syslog
Enabled features: api checker debuglog graphite ido-mysql mainlog notification perfdata
Name Version
icinga/icinga-php-library 0.6.1
icinga/icinga-php-thirdparty 0.10.0
Loaded Modules
Name Version
director 1.8.1
doc 2.9.3
graphite 1.1.0
incubator 0.7.0
monitoring 2.9.3
reactbundle 0.9.0
icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: 2.13.1-1)
CentOS 7.9
PHP 7.4.24
To test it, I disconnected one of my systems network cards in vmware and let it go down. This kicks off the notify and emails out.
From debug log:(values here were redacted for privacy)
[2021-11-12 12:14:00 -0500] debug/Notification: Type ‘Problem’, TypeFilter: Acknowledgement, Custom, DowntimeEnd, DowntimeRemoved, DowntimeStart, Problem and Recovery (FType=32, TypeFilter=127)
[2021-11-12 12:14:00 -0500] debug/Notification: State ‘Down’, StateFilter: Down and Up (FState=32, StateFilter=48)
[2021-11-12 12:14:00 -0500] debug/Notification: User ‘nyusername’ notification ‘nameofservericinga2!HostDownApply’, Type ‘Problem’, TypeFilter: Acknowledgement, Custom, DowntimeEnd, DowntimeRemoved, DowntimeStart, Problem and Recovery (FType=32, TypeFilter=127)
[2021-11-12 12:14:00 -0500] debug/Notification: User ‘nyusername’ notification ‘nameofservericinga2!HostDownApply’, State ‘Down’, StateFilter: Critical, Down, OK, Unknown, Up and Warning (FState=32, StateFilter=63)
[2021-11-12 12:14:00 -0500] information/Notification: Sending reminder ‘Problem’ notification ‘nameofservericinga2!HostDownApply’ for user ‘nyusername’
[2021-11-12 12:14:00 -0500] notice/ApiListener: Relaying ‘event::NotificationSentToAllUsers’ message
[2021-11-12 12:14:00 -0500] notice/Process: Running command ‘/etc/icinga2/scripts/mail-host-notification.sh’ ‘10.300.200.555’ ‘’ ‘’ ‘-c’ ‘’ ‘-d’ ‘2021-11-12 12:14:00 -0500’ ‘-l’ ‘nameofservericinga2’ ‘-n’ ‘nameofservericinga2’ ‘-o’ ‘CRITICAL - Host Unreachable (10.300.200.555)’ ‘-r’ ‘myemailaddress@mycomp.com’ ‘-s’ ‘DOWN’ ‘PROBLEM’: PID 23635
[2021-11-12 12:14:00 -0500] information/Notification: Completed sending ‘Problem’ notification ‘nameofservericinga2!HostDownApply’ for checkable ‘nameofservericinga2’ and user ‘nyusername’ using command ‘hostdownCMD’.
[2021-11-12 12:14:00 -0500] notice/ApiListener: Relaying ‘event::NotificationSentUser’ message
[2021-11-12 12:14:00 -0500] notice/Process: PID 23635 (’/etc/icinga2/scripts/mail-host-notification.sh’ ‘10.300.200.555’ ‘’ ‘’ ‘-c’ ‘’ ‘-d’ ‘2021-11-12 12:14:00 -0500’ ‘-l’ ‘nameofservericinga2’ ‘-n’ ‘nameofservericinga2’ ‘-o’ ‘CRITICAL - Host Unreachable (10.300.200.555)’ ‘-r’ ‘myemailaddress@mycomp.com’ ‘-s’ ‘DOWN’ ‘PROBLEM’) terminated with exit code 0
Command:
Notification template:
Notification Apply:
Email that is sent: