Export Virtual Server Configuration in CSV - tmsh cli script
Problem this snippet solves:
This is a simple cli script used to collect all the virtuals name, its VIP details, Pool names, members, all Profiles, Irules, persistence associated to each, in all pa...
Updated Oct 24, 2023
Version 2.0jaikumar_f5
MVP
Joined May 16, 2019
jaikumar_f5
MVP
Joined May 16, 2019
jaikumar_f5
Mar 15, 2021MVP
Apologies on the late reply, sorry the steps shared above didn't help you.
Here's the steps,
Login to the CLI
If you are in bash, get inside tmos by running tmsh command.
tmsh
Once your inside tmos, enter create cmd,
create cli script virtual-details
This should open the editor and there will be multiple default proc blocks like below,
Delete them all & add the one's i've shared in the code, use the code version 4.0 alone. All we need is proc script::run block code alone.
Using vi editor paste it.
save & exit.
Then when u run the below command. you should see the script.
tmsh list cli script virtual-details
Then using tmsh run command, you can run it.
tmsh run cli script virtual-details > /var/tmp/virtual-details.csv
Output will be in /var/tmp/
Please let me know if you want more details.