Forum Discussion
Danicoolbug
May 26, 2021Nimbostratus
How to execute show command for multiple vips in F5 ltm?
i have a show command to get details of a single vip. I have a list of 30 vip names in a single F5 device, i would like to know if there is any script that i can run the show command for 30 vips? ...
- May 26, 2021
Hi
Can you please take a look at this codeshare,
Or you can go with simple bash script.
#!/bin/bash echo "Virtual Server, State, Status" > /var/tmp/virtuals-output.csv for vs in `cat /var/tmp/vs-input.txt` do virtual_state=`tmsh show ltm virtual $vs all-properties | grep "Availability" | awk '{print $3}'` virtual_status=`tmsh show ltm virtual $vs all-properties | grep "State" | awk '{print $3}'` echo "$vs,$virtual_state,$virtual_status" >> /var/tmp/virtuals-output.csv done
Danicoolbug
Jun 05, 2021Nimbostratus
Thanks Jai. The script did the job👌
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