For F5 BigIP professionals/administrators, it is a tough but indispensable job, to generate reports of virtual servers and their associated resources like iRule, Persistence Profile, Client SSL profile etc.
I have already written various scripts to efficiently perform some of these reporting tasks and shared it here. you can find them here
This post joins the same list and this script could be used for the following scenarios
- To list all Persistence profiles and the Virtual servers associated with them
- To list all virtual servers having session persistence enabled along with the persistence profile name.
- To generate CSV report of virtual servers having persistence profiles enabled
- To generate CSV report of persistence profiles and the virtual servers using them.
This is created on top of F5 BIGIP's inbuilt tmsh
command line interface.
Prerequisites:
- You must have
Advanced Shell Access
in F5 Big IP - You should have python installed in the device ( This script tested with Python 2.6 )
- Some basic command line skills ( unix )
- putty to SSH
Version
This script was tested with 11.6 and 13.1 F5 BigIP distributions
How to execute
Step1: Login to the server using your favorite SSH terminal tool
Step2: Copy the script( Choose according to your requirement, there are two scripts given below) and save it to your desired location
Step3: Execute the script as follows
python <scriptname.py>
Note*: By default, the script is designed to print the output in a CSV format. You can redirect them to a .csv file and download and open it in excel. If you would like take a CSV report use the following command it will avoid the F5 Info & Error messages so that you will get just exactly what you are looking for
python <scriptname.py> 2>/dev/null > somereport.csv |
Sample Result:
The Source Code:
This script should be used when you have multiple partitions in your F5-BigIP
This script should be used when you have no partitions (or) just one default common
Partition
Hope this Helps!
Cheers,
A K S A RA V
Write to us at [email protected]
Follow us on Facebook or Twitter
To Join our Community in Whatsapp – Click here