Forum Discussion

OTS02's avatar
OTS02
Icon for Cirrus rankCirrus
Apr 28, 2010

LocalLBNAT statistics

I am having trouble getting statistics for nats.

 

 

I managed to declare nat_list, and get it to load into a list box, but cannot figure out what I need to do to actually get the statistics for the nats

 

 

iControl.LocalLBNATNATDefinition[] nat_list = m_interfaces.LocalLBNAT.get_list();

 

 

for (int i = 0; i < nat_list.Length; i++)

 

{

 

x_address = nat_list.translation_address;

 

o_address = nat_list.original_address;

 

 

lb_nats.Items.Add(nat_list);

 

 

iControl.LocalLBNATNATStatistics nat_stats = ??don't know??

 

}

 

 

If someone could show me how to actually pull the stats, I would be very grateful.

 

2 Replies

  • There is a LocalLB.NAT.get_statistics() method, check out the documentation:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iControl/LocalLB__NAT__get_statistics.html

     

     

    It takes the NATDefinition[] array as a parameter, your your case it is the nat_list array, so there is no need to use a "for" loop to get the statistics for all nats
  • Thank you samstep

     

     

    I did the following and got it to give me the stats list:

     

     

    iControl.LocalLBNATNATStatistics natstats;

     

    natstats = m_interfaces.LocalLBNAT.get_statistics(nat_list);