Forum Discussion
OTS02
Cirrus
Apr 28, 2010LocalLBNAT 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
- samstep
Cirrocumulus
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 - OTS02
Cirrus
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);
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects