BIG-IP Configuration Visualizer - iControl Style
I posted almost two years ago to the day on a cool tool called BIG-IP Config Visualizer, or BCV, that one of our field engineers put together that utilizes a BIG-IP config parser and GraphViz to create images visualizing the relationship of configuration objects for a particular virtual server. Well, I’m here to report that another community user, Russell Moore, has taken that work to the next level. Rather than trying to figure out the nuances of configuration objects amongst all the versions of BIG-IP, he converted the script to utilize iControl! In this tech tip, I’ll walk through the installation steps necessary to get this tool off the ground.
The Setup
Install a few libraries and GraphViz via apt-get
- apt-get install libssl-dev libcrypt-ssleay-perl libio-socket-ssl-perl libgraph-writer-graphviz-perl
Open a CPAN shell and install SOAP::Lite and Net::Netmask
- perl –MCPAN –e shell
- install SOAP::Lite
- install Net::Netmask
After installing those libraries and tools, grab the BCV-iControl source from the codeshare, save it as an executable (bcv.pl on my system) and set these variables (I only changed the ones in bold type):
#Declare CLI $vars
my $vs1;
my $new_dir = 'NO_DIR';
my $extension = 'NO_EXT';
my $ltm_host = "172.16.99.5";
my $ltm_port = '443';
my $user_id = "admin";
my $req_partition;
my $user_password = "admin";
my $ltm_protocol = 'https';
my $path;
my $dir;
Finally, some command-line options:
root@ubuntu:/home/jrahm# ./bcv.pl -h
Thank you for using BIG-IP Configuration Visualizer (BCV 1.16.1-revisited with soap)
-v <VS_NAME> this prints the specified virtual server and requires option -c.
Default is to print all-c Specify the partition/container to look in for option -v
-t <iControl host LTM> specify ltm_host IP we will connect to
-d specifies a directory you want the images in.
Has to be in Current working Directory:
/home/jrahm
Default is /img)-e Define image format options: svg, png (default is jpg)
-help for help but you already found it
The Payoff
Now that all the legwork is complete, we can play!
root@ubuntu:/home/jrahm# ./bcv.pl
Please wait while we build some maps of your system.
Retrieving SelfIPs in Partition: ** Common **
Mapping Partition: ** Common ** routes to gateways
Mapping Partition: ** Common ** selfIPs and VLANs..
Mapping Partition: ** Common ** pools and iRule references to pools............
Mapping Partition: ** Common ** virtual servers and properties...
Drawing VS: dc.hashtest which is 1 of 3 in Partition: Common
Drawing VS: testvip1 which is 2 of 3 in Partition: Common
Drawing VS: management_vip which is 3 of 3 in Partition: CommonAll drawings completed! They can be found in:
/home/jrahm/img
Taking a look at the virtual server I used for the hashing algorithm distribution tech tip:
Conclusion
Visual representations of configurations are incredibly helpful in identifying issues quickly. An interesting next step would be to track state of objects from iteration of the drawings, and build a page to include all the images. That would make a nice and cheap dashboard for application owners or operating centers. Any takers? Thanks to community user Russell Moore that took a great contributed tool and made it better with iControl!
- L4L7_53191NimbostratusFantastic work Russell - excellent stuff.
- James_Beckett_4NimbostratusI've updated the script to fix a bug with iRule-to-pool mappings when a VS config has multiple iRules.
- rlb63_75866NimbostratusI am somewhat new to this. Do you run these scripts and application on theLTM/GTM, or do you move the configs and run this on another server?
- James_Beckett_4Nimbostratusrib63: You'd run this on another host, but you don't need to copy the configs around. When you run the script you specify where to connect to, and it collects all the configuration data over SOAP. Any firewall will need a suitable rule allowing the port (443/https usually).
- laserAltostratusThe script doesn't seem to support self-signed device certificates, is this correct?
- Try adding this to the script:
- adam_1930NimbostratusDoes anyone have an updated link for this? The only download I can find is bcv1.16.1 The codeshare link above is broken.
- smegelas_180601NimbostratusHi, Could you post this script with updated code (SOAP), please ? Rgds SIlvere
- SLCirrusHi All I am trying to get use the above but I am getting the following when exectuing the file bcv.pl ./bcv.pl: line 26: use: command not found ./bcv.pl: line 27: use: command not found ./bcv.pl: line 28: use: command not found ./bcv.pl: line 29: use: command not found ./bcv.pl: line 30: use: command not found ./bcv.pl: line 31: syntax error near unexpected token `(' ./bcv.pl: line 31: `use Cwd qw(realpath);' Any ideas as to what may be causing this?
- SLCirrusHi All I know get a message saying File not found: bigip.conf