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 @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.
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’ ‘0.0.0.0’ ‘-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.