Forum Discussion
ravikumar24
Nimbostratus
Feb 27, 2024looks like below one did the job.
==========================
echo vs name, destination, state, pool, pool members
VIRTUALS=$(tmsh list ltm virtual | grep "ltm virtual" | cut -d" " -f3)
for VS in $VIRTUALS;
do
echo -n $VS,
DEST=$(tmsh list ltm virtual $VS | grep destination | cut -d" " -f6)
echo -n $DEST,
AVAIL=$(tmsh show ltm virtual $VS | grep Availability | cut -d: -f2)
echo -n \"$AVAIL\",
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