Code: Select all
#!/bin/sh
# This is a sample shell script showing how you can submit the REMOVE_SVC_ACKNOWLEDGEMENT command
# to Nagios. Adjust variables to fit your environment as necessary.
now=`date +%s`
commandfile='/usr/local/nagios/var/rw/nagios.cmd'
/bin/printf "[%lu] REMOVE_SVC_ACKNOWLEDGEMENT;$1;$2\n" $now > $commandfile
The acknowledgement is not removed and I see the following in /usr/local/nagios/var/nagios.log
Code: Select all
[1540828100] Error: External command failed -> REMOVE_SVC_ACKNOWLEDGEMENT;SOMEHOST;Disk Usage on D:/\n 1540828100
[1540828100] External command error: Command failed
Code: Select all
ll /usr/local/nagios/var/rw
total 8.0K
drwxrws---. 2 nagios nagcmd 4.0K Oct 29 11:48 .
drwxr-xr-x. 6 nagios nagios 4.0K Oct 29 11:53 ..
prw-rw---- 1 nagios nagcmd 0 Oct 29 11:49 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 Oct 29 11:48 nagios.qh