Forum Discussion
omar_padilla
Altocumulus
Thank you this is very helpfull, but how can i add the source ip? when i try to modify something i only get errors or nothing at all.
Thank you for you help.
niirraaj
Jan 10, 2024Nimbostratus
I have modified the script and its working for me
echo vs name, source, destination, pool, pool members
VIRTUALS=$(tmsh list ltm virtual | grep "ltm virtual" | cut -d" " -f3)
for VS in $VIRTUALS;
do
echo -n $VS,
src=$(tmsh list ltm virtual $VS | grep source | cut -d" " -f6)
echo -n $SRC,
DEST=$(tmsh list ltm virtual $VS | grep destination | cut -d" " -f6)
echo -n $DEST,
POOL=$(tmsh list ltm virtual $VS | grep pool | cut -d" " -f6)
echo -n $POOL,
if [ -n "$POOL" ];
then
MBRS=$(tmsh list ltm pool "$POOL" | grep address | cut -d" " -f14)
echo -n $MBRS
fi
echo
done