Forum Discussion
Robert_Luechte2
Cirrus
Sep 15, 2015iRule function to get node IP address from node name
Does anyone know of a method to retrieve the IP address of a node when you know the name of the node? I would like to to a LB::status command for a pool member, but I only know the name of the node,...
Stefan_Klotz
Cumulonimbus
Sep 16, 2015Hi Robert,
what about something like this? (sorry haven't the correct syntax in mind right now, but it should point you in the right direction)
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 : | sort | awk '{print $1}'`; do
POOLMEMBER_NAME=
POOLMEMBER_PORT=
POOLMEMBER_IP_TMP=($(tmsh list ltm node $POOLMEMBER_NAME | grep "address"))
POOLMEMBER_IP=
echo \"$POOLNAME/$POOLMEMBER_NAME/$POOLMEMBER_IP/$POOLMEMBER_PORT\", >> ${classfile}
done
done
Ciao Stefan 🙂
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
