Forum Discussion

paul_dawson_258's avatar
paul_dawson_258
Icon for Nimbostratus rankNimbostratus
May 11, 2016

Neat and tidy iControl data extraction

Hi, I am looking for an iControl script that will list the Virtual Server name, destination IP, Pool names and Pool Member IPs in a tidy output. Surely one must exist?

 

I don't mind how I call it - Python / Powershell / Perl etc but I can't seem to find one on the site that lists the Virtual IP address with all the relevant hierarchical information.

 

Can anyone suggest which one to use? I would like to basically see what is on the Local Traffic Network May but include the UP.

 

TIA

 

3 Replies

  • I can whip you up a perl script in no time. Do you need status as well or just for configuration? If you could provide an example output you would like it to look like I can try to get you something close...
  • Actually, forgot I already wrote one. Give this a shot: https://devcentral.f5.com/codeshare/perl-local-traffic-map

    I'll produce output like this:

    ***** SITE MAP FOR BIG-IP  ******
    /Common/myvip (VS)
    |    Unknown (Enabled) The children pool member(s) either don't have service checking enabled, or service check results are not available yet
    +-> /Common/mypool (P)
        | Unknown (Enabled) The children pool member(s) either don't have service checking enabled, or service check results are not available yet
        +-> 10.10.10.10:80 (PM)
            | Unknown (Enabled) Pool member does not have service checking enabled
        +-> 10.10.10.20:80 (PM)
            | Unknown (Enabled) Pool member does not have service checking enabled
    

    Hope this helps!

    BTW, I found it on the iControl CodeShare index page at https://devcentral.f5.com/wiki/iControl.CodeShare.ashx where there are lots of samples for you to start with.

    -Joe

  • Just updated the code in the codeshare sample to include the destination address. Just needed to call LocalLB.get_destination() and add that to the output. I added the destination to the end of the vip name line. There is a get_destination_v2() which includes the folder path as well but this is cleaner. Output looks like this:

     

    $ ./LocalTrafficMap.pl bigip_addr user pass
    ***** SITE MAP FOR BIG-IP  ******
    /Common/myvip (VS) 20.20.20.20:80
    |    Unknown (Enabled) The children pool member(s) either don't have service checking enabled, or service check results are not available yet
    +-> /Common/mypool (P)
        | Unknown (Enabled) The children pool member(s) either don't have service checking enabled, or service check results are not available yet
        +-> 10.10.10.10:80 (PM)
            | Unknown (Enabled) Pool member does not have service checking enabled
        +-> 10.10.10.20:80 (PM)
            | Unknown (Enabled) Pool member does not have service checking enabled
    +-> /Common/myirule (R)

    It's very easy to change the format of the output.