Forum Discussion
Stacked monitoring?
Hi Patrik,
Thanks for the reply. I've been playing with a bash script to do this but am having some problems that maybe someone here could help with.
"mypool1" is offline, "mypool2" is online. When I run this script with only mypool1 the result I get is 0 (offline) and when I run it with only mypool2 I get 1 (online) and when I run it with both commands I get 1 (online) when I would expect it to be 0.
If I run those commands by themselves for mypool1 I get the text "offline" (expected) and with mypool2 it doesn't return any text (expected).
!/bin/sh
pidfile="/var/run/pinger.$1..$2.pid"
if [ -f $pidfile ]
then
kill -9 `cat $pidfile` > /dev/null 2>&1
fi
echo "$$" > $pidfile
node_ip=`echo $1 | sed 's/::ffff://'`
tmsh show ltm pool Mypool1_Stg_pool field-fmt | grep -o offline > /dev/null
tmsh show ltm pool Mypool2_Stg_pool field-fmt | grep -o offline > /dev/null
status=$?
echo "$status"
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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