cancel
Showing results for 
Search instead for 
Did you mean: 
JRahm
Community Manager
Community Manager

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: Common

All 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:

0151T000003d46KQAQ.jpg

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!

Comments
L4L7_53191
Nimbostratus
Nimbostratus
Fantastic work Russell - excellent stuff.

 

-Matt
James_Beckett_4
Nimbostratus
Nimbostratus
I've updated the script to fix a bug with iRule-to-pool mappings when a VS config has multiple iRules.
rlb63_75866
Nimbostratus
Nimbostratus
I 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?

 

Thanks
James_Beckett_4
Nimbostratus
Nimbostratus
rib63: 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).
Drewv
Nimbostratus
Nimbostratus
The script doesn't seem to support self-signed device certificates, is this correct?

 

 

Uncaught exception from user code:

 

500 Can't connect to 192.168.201.5:443 (certificate verify failed) at ./f5-gv.pl line 723

 

at /usr/local/share/perl/5.14.2/SOAP/Lite.pm line 3610

 

Joe_Pruitt
Cirrostratus
Cirrostratus
Try adding this to the script:

 

 

$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;

 

 

Newer versions of LWP added this check. This will tell the LWP code to allow self-signed certs.

 

 

-Joe
adam_1930
Nimbostratus
Nimbostratus
Does anyone have an updated link for this? The only download I can find is bcv1.16.1 The codeshare link above is broken.
smegelas_180601
Nimbostratus
Nimbostratus
Hi, Could you post this script with updated code (SOAP), please ? Rgds SIlvere
SL
Altocumulus
Altocumulus
Hi 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?
SL
Altocumulus
Altocumulus
Hi All I know get a message saying File not found: bigip.conf
SL
Altocumulus
Altocumulus
I was able to find a v10 config file and the output works perfectly. Thus appears that the code needs to be udpated for v11. Does anyone know where and what needs to be changed so that it can read v11 files?
hsoltero_217537
Nimbostratus
Nimbostratus
what is the latest? Has someone rebuilt the script such that it runs on v11.x?
Version history
Last update:
‎25-Jan-2011 09:01
Updated by:
Contributors