Forum Discussion
Troy_93881
Apr 01, 2011Nimbostratus
Monitor using "grep"
All,
Looking for a little guidance. I would like to know if I can set up a monitor ( multiple monitors ) that would run a "grep" command and based on results -- mark a member up or down. ...
Troy_93881
Apr 05, 2011Nimbostratus
Hey Aaron,
It appears to marking it up regardless as long as there is any response. In this case -- I need to see a "./" in the response to both commands in order for it to be up. If the ./ is missing in either response -- the server should be marked down.
How do I change that in the script section below or do I need 2 external programs?
send request & check for expected response
ssh $IP -p $PORT 'ps -ef | grep arserverd | grep -v grep && ps -ef | grep arplugin | grep -v grep' 2>&1 > /dev/null
mark node UP if expected response was received
if [ $? -eq 0 ]
then
echo "UP"
fi
rm -f $PIDFILE
exit
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects