Ok,
I worte a script to check if a process is running or not. I ran the script on the box and got an exit code of 0 that being the case solarwinds should report the service as ok However instead I get the fallowing
Testing on node pbx01: failed with 'Undefined' status
Invalid script return code: 126 |
#!/bin/sh
SERVICE='asterisk'
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
echo "$SERVICE service is running everything is FINE!"
echo $?
else
echo "$SERVICE is not running"
echo "$SERVICE is not running!" | mail -s "$SERVICE down" root
echo $?
fi
Anythoughts as to why I would get a exit status of 126 via solarwinds but an exit 0 if I run the script on the box?