Forum Discussion
bsb
Nimbostratus
Dec 29, 2017Fetch all details about VS, POOLS, Nodes, etc.
@jaikumar_f5
Hi Jay,
was going through your post.
command echo Virtual-Server, Destination, Pool, Pool-Members > /var/tmp/$HOSTNAME.csv creates an CSV file, i tested this and it creates a...
nitass
Employee
Dec 29, 2017just another example using awk
[root@ve13a:Active:In Sync] config tmsh list ltm virtual one-line |awk '{for(i=0;i<=NF;i++)if($i=="pool"){p=$(i+1)}; print $3,$6,p}' |awk '{cmd="tmsh list ltm pool " $3 " one-line"; cmd|getline r; print $1,$2,$3,r}' |awk '{printf "%s,%s,%s",$1,$2,$3} {for(j=3;j<=NF;j++)if($j~/:/){printf ",%s",$j} {print ""}}'
bar,172.28.24.10:80,poola,200.200.200.101:80
baz,1.2.3.4:80,poolb,200.200.200.111:80,200.200.200.201:80
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