Forum Discussion
Jim_Moore
Nimbostratus
Apr 01, 2015Pool member status iRule version 11 node name
Running into another issue. In version 11 there is a name field for nodes. If the name field is populated it is displayed as the pool member. The bash script will put name:port in the class file. ...
cjunior
Nacreous
Apr 16, 2015Hi,
I needed to see the previous case to understand what you wanted. If I got it, you want to store member's IP instead of member's name, right? see if it works to you:!/bin/bash
tmsh modify sys db bigpipe.displayservicenames value false
rm -f /var/class/pool_member_status_list.class
for POOLNAME in `tmsh list ltm pool | grep -i "ltm pool" | sort | awk '{print $3}'`; do
for POOLMEMBER in `tmsh list ltm pool $POOLNAME | grep : -A 1 | sed -e 's/address//' | awk -F" " 'BEGIN {i=0} { if ($1=="--") { i=0; next; } else if (i==0) { a=$1; } else if (i==1) { print $1":"a; } else { i=0; next;}; i++; }' | awk -F":" '{print $1":"$3}'`; do
echo \"$POOLNAME/$POOLMEMBER\", >> /var/class/pool_member_status_list.class
done
done
if [ "`cat /var/prompt/ps1`" == "Active" ]; then
tmsh load sys config
fi
exit 0
Best regards!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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