Re: Unable to execute script using event_handler
Posted: Mon Jun 12, 2017 10:22 am
Check the remote system's log files to see why the command ran on the Nagios system but did not run the command on the remote system, there has to be a permission / login account issue that is keeping the command from running.
You can try running the command as the nagios user again but enabling verbose mode by adding the -vvv to the command like the example below. That may tell you why it it not working.
You can try running the command as the nagios user again but enabling verbose mode by adding the -vvv to the command like the example below. That may tell you why it it not working.
Code: Select all
su - nagios
sshpass -p 'P@ssword123*' ssh -vvv -tt -l [email protected] 10.0.254.4 'schtasks /Run /TN Shutdown_ALL_INFRA'