Have some code. Share some code.
Showing results for 
Search instead for 
Did you mean: 

Problem this snippet solves:

This is a script utilizing the Graphviz package that will create graphs of the relationships of configuration objects of a virtual server.

How to use this snippet:


  1. Perl
  2. SOAP::Lite
  3. Net::Netmask
  4. Graphviz

Note: There are other required packages, but the remainder are default in Ubuntu 10.10 perl distribution. This may not be the case with your configuration.

  1. Install dependent libraries via apt-get - depending on your distribution you may have all of these as packages:
    • libssl-dev
    • libcrypt-ssleay-perl
    • libio-socket-ssl-perl
    • libgraph-writer-graphviz-perl
    • libsoap-lite-perl
    • libnet-netmask-perl
  2. For any which aren't available, open a CPAN shell (perl -MCPAN -e shell) and install them with commands such as:
    • install SOAP::Lite
    • install Net::Netmask
  3. Grab the archive below, extract the perl script file, and make it executable

Minimal command-line invocation is:

  • ./ -t bigip-host-name.your.domain -u userid -p password

The output by default goes into a subdirectory img, but you might want to add the option -d output-directory to keep output files separate from successive runs, particularly if you will run the utility against different BIG-IP systems for different operational environments. You can also use these:

  • -c partition -v vs to run for only a particular VS (the partition must also be given)
  • -e to change the output file type - default is JPG, but there are the options of SVG or PNG

Run it!

Put it in /etc/crontab to run every night, perhaps, and output the files to a directory served by Apache? The files are predictably named, so you could link directly to them from other tools.

If you are averse to command-line parameters (perhaps you don't want the password to appear in a process listing) you can instead update these variables in the script:

  • my $ltm_host
  • my $user_id
  • my $user_password
Hello, is this working in BIG-IP V11? I've tried to execute the code and get: Uncaught exception from user code: 500 Can't connect to (certificate verify failed) at ./ line 723. SOAP::Lite::__ANON__('SOAP::Lite=HASH(0x1a42180)', '\x{a}not well-formed (invalid token) at line 1, column 3, byte 3 ...') called at /usr/share/perl5/SOAP/ line 3796 SOAP::Lite::call('SOAP::Lite=HASH(0x1a42180)', 'get_version') called at /usr/share/perl5/SOAP/ line 3761 SOAP::Lite::__ANON__('SOAP::Lite=HASH(0x1a42180)') called at ./ line 723 main::get_api_version() called at ./ line 283 Thanks Edoardo

@ Russell Moore is this work with version 12 ?





Editing line 62 "use SOAP::Lite;"


to read:


"use IO::Socket::SSL;


IO::Socket::SSL::set_defaults(SSL_verify_mode => 0);


use SOAP::Lite;




will allow you to connect with a self-signed certificate, not that it is the best of ideas.


Unfortunately, As of v11.4.0 the the get_httpclass_profile() function is deprecated immediately. Attempting to perform this function will return a not-implemented exception.


As a workaround you can change line 368 "my $vs_httpclass = get_vs_httpclass($vs_name) || 'NO_HTTPCLASS';"


to read:


"my $vs_httpclass = 'NO_HTTPCLASS';"


which let the script run until it errors out while trying to draw the images. By creating the subdirectories under ./img (example ./img/Common) the script ran successfully.



You can remove your password from your bash history simply by running:


$ history $ history -d linenumber


Version history
Last update:
‎07-Mar-2015 14:22
Updated by: