Icinga Notification Plugin Command not Running Script/Command File

Hi Everyone,
I am facing an issue in my Icinga 2 environment and need your kind help in diagnosing this issue. Basically I have created a plugin notification command which runs a bash script file. The script is executing fine when run manually. However when the notification command is run, the script doesn’t get executed. For some reason it is not executing the script. Any sort of help and suggestion is very appreciated. Thanks in advance.


Hi @kashoo

does icinga2 have permission to run the script? Keep in mind that icinga2 runs as user “nagios”:
sudo -u nagios /otrs/host_notify_halo.sh

Hi @ritzgu
Yes icinga2 have permission to run the script. When run my script using this sudo -u nagios /otrs/host_notify_halo.sh, it is being executed. But when I run the notification command, it is still down executing the script.

-rwxr-xr-x. 1 nagios nagios 1779 Apr 1 14:30 host_notify_halo.sh

You may enable the debuglog and watch it. For example:

tail -f /var/log/icinga2/debug.log | grep host_notify_halo

Hi @ritzgu
Troubleshooting through debug logs have show that system is creating and running below command. Please ignore data as it is dummy.
…/otrs/host_notify_halo.sh’ ‘-4’ ‘’ ‘-6’ ‘’ ‘-C’ ‘XYZ-CUSTOMER’ ‘-b’ ‘’ ‘-c’ ‘’ ‘-d’ ‘2022-04-01 18:15:37 +0500’ ‘-i’ ‘Domain.com’ ‘-l’ ‘XYZ-HOST’ ‘-n’ ‘XYZ-HOST’ ‘-o’ ‘test’ ‘-r’ ‘xyz@somemail.com’ ‘-s’ ‘DOWN’ ‘-t’ ‘PROBLEM’
However this command is not doing anything when run on runtime. But when run manually on shell it is producing desired result.