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?
Are you using the same user in the Orion APM script credentials that you are using for testing the script on the box?
Yes I am using the same user ID with the same creditials
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.