Need some help with the configs for mail notification

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:
hostdown

Notification Apply:
hostdown

Email that is sent:
Screenshot_20211112_121457

Hello! I’ll start with the usual spill of we like to have posts formatted according to these guidelines

It is definitely not sending the values (notice all of the “blank” fields with ‘’) – not sure why however.

Have you tried submitting a passive check in Icingaweb2 to trigger the downtime? I expect it would produce the same results, but at least then you will not have to unplug a cable each time you want to trigger an alert.

We have a custom mail script for our environment that I inherited, but your values look correct. It does look like a lot of the stuff from your command isn’t actually passing a flag, and I winder if something’s up with skip_key. Looking at the script’s help, it seems like they want the flag there, can you copy your existing command and try it without skip_key?