Forum Discussion
5 Replies
Sort By
- use LocalLB.PoolMember.get_statistics() for the given pool member and look through the returned statistics for the STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS statistic.
http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=254
- patrickmamaid_1Nimbostratushey Joe i'm kinda stuck trying to convert this line in java
$MemberStatisticsA = (Get-F5.iControl).LocalLBPoolMember.get_statistics( (, $pool_name), $MemberDefAofA);
iControl.LocalLBPoolMember lb;
iControl.LocalLBPoolMemberMemberStatistics ms; ms.getStatistics();
- The lb.get_statistics() method should exist. Did you pass in the correct parameters (a 1-D array of pool names, and a 2-D array of pool members for each pool in the first parameter)?
- Oops, forgot that Axis1 has no direct conversion from the PortType class. You'll need to create local variables for the *PortType classes to make the method calls.
public void GetPoolMemberStats(String bigip, String username, String password, String pool_name) throws RemoteException, java.lang.Exception { iControl.Interfaces interfaces = new iControl.Interfaces(); if (interfaces.initialize(bigip, (long)443, username, password) ) { String [] pool_list = new String[] {pool_name}; iControl.LocalLBPoolMemberPortType t = interfaces.getLocalLBPoolMember(); iControl.LocalLBPoolMemberMemberStatistics [] memberStatsA = t.get_all_statistics(pool_list); for(int i=0; i { System.out.println("Pool " + pool_list[ i ]); iControl.LocalLBPoolMemberMemberStatisticEntry [] statEntryA = memberStatsA[ i ].getStatistics(); for(int j=0; j { iControl.CommonIPPortDefinition memberDef = statEntryA[j].getMember(); System.out.println("+ " + memberDef.getAddress() + memberDef.getPort()); iControl.CommonStatistic[] statisticsA = statEntryA[j].getStatistics(); for(int k=0; k { iControl.CommonStatisticType type = statisticsA[k].getType(); iControl.CommonULong64 ul64 = statisticsA[k].getValue(); long value = (long)(ul64.getHigh()<<32) + (long)ul64.getLow(); System.out.println(" " + type.toString() + " -> " + value); } } } } }
- patrickmamaid_1Nimbostratusthis really helped! thanks Joe!