Forum Discussion

adamp_1519's avatar
adamp_1519
Icon for Nimbostratus rankNimbostratus
Apr 30, 2008

statistics for pool member (for use with RRD/MRTG)

I wish to use iControl to extract statistical information every 5 minutes (or whatever) and feed that information back in to RRD or MRTG.

 

 

Using some provided examples (from the SDK):

 

/iControl-9.6.0/sdk/samples/soap/perl/soaplite/LocalLB/PoolStats.pl

 

/iControl-9.6.0/sdk/samples/soap/perl/soaplite/LocalLB/PoolMemberMonitors.pl

 

 

i can extract the pool stats, however i wish to only do so for an individual pool or member within a pool, and only a requested statistic, rather than walking the tree.

 

 

is it possible to request just the statistic or must the tree be walked and the required value picked out?

 

 

The array manipulation in the example scripts is pretty ugly (in perl), is this the preferred method? or can iControl take a requested parameter for the stat?

 

 

 

eg:

 

 

POOL RoundRobin_test LB_METHOD LB_METHOD_ROUND_ROBIN MIN/CUR ACTIVE MEMBERS: 0/2

 

| STATISTIC_SERVER_SIDE_BYTES_IN : 9246783

 

| STATISTIC_SERVER_SIDE_BYTES_OUT : 23988749

 

| STATISTIC_SERVER_SIDE_PACKETS_IN : 28479

 

| STATISTIC_SERVER_SIDE_PACKETS_OUT : 31163

 

| STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS : 0

 

| STATISTIC_SERVER_SIDE_MAXIMUM_CONNECTIONS : 18

 

| STATISTIC_SERVER_SIDE_TOTAL_CONNECTIONS : 1499

 

| STATISTIC_PVA_SERVER_SIDE_BYTES_IN : 0

 

| STATISTIC_PVA_SERVER_SIDE_BYTES_OUT : 0

 

| STATISTIC_PVA_SERVER_SIDE_PACKETS_IN : 0

 

| STATISTIC_PVA_SERVER_SIDE_PACKETS_OUT : 0

 

| STATISTIC_PVA_SERVER_SIDE_CURRENT_CONNECTIONS : 0

 

| STATISTIC_PVA_SERVER_SIDE_MAXIMUM_CONNECTIONS : 0

 

| STATISTIC_PVA_SERVER_SIDE_TOTAL_CONNECTIONS : 0

 

| STATISTIC_TOTAL_PVA_ASSISTED_CONNECTIONS : 0

 

| STATISTIC_CURRENT_PVA_ASSISTED_CONNECTIONS : 0

 

+-> MEMBER 192.168.0.10:80

 

| STATISTIC_SERVER_SIDE_BYTES_IN : 4425051

 

| STATISTIC_SERVER_SIDE_BYTES_OUT : 11105300

 

| STATISTIC_SERVER_SIDE_PACKETS_IN : 13273

 

| STATISTIC_SERVER_SIDE_PACKETS_OUT : 14225

 

| STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS : 0

 

| STATISTIC_SERVER_SIDE_MAXIMUM_CONNECTIONS : 9

 

| STATISTIC_SERVER_SIDE_TOTAL_CONNECTIONS : 734

 

| STATISTIC_PVA_SERVER_SIDE_BYTES_IN : 0

 

| STATISTIC_PVA_SERVER_SIDE_BYTES_OUT : 0

 

| STATISTIC_PVA_SERVER_SIDE_PACKETS_IN : 0

 

| STATISTIC_PVA_SERVER_SIDE_PACKETS_OUT : 0

 

| STATISTIC_PVA_SERVER_SIDE_CURRENT_CONNECTIONS : 0

 

| STATISTIC_PVA_SERVER_SIDE_MAXIMUM_CONNECTIONS : 0

 

| STATISTIC_PVA_SERVER_SIDE_TOTAL_CONNECTIONS : 0

 

| STATISTIC_TOTAL_REQUESTS : 4048

 

| STATISTIC_TOTAL_PVA_ASSISTED_CONNECTIONS : 0

 

| STATISTIC_CURRENT_PVA_ASSISTED_CONNECTIONS : 0

 

+-> MEMBER 192.168.0.20:80

 

| STATISTIC_SERVER_SIDE_BYTES_IN : 4821732

 

| STATISTIC_SERVER_SIDE_BYTES_OUT : 12883449

 

| STATISTIC_SERVER_SIDE_PACKETS_IN : 15206

 

| STATISTIC_SERVER_SIDE_PACKETS_OUT : 16938

 

| STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS : 0

 

| STATISTIC_SERVER_SIDE_MAXIMUM_CONNECTIONS : 9

 

| STATISTIC_SERVER_SIDE_TOTAL_CONNECTIONS : 765

 

| STATISTIC_PVA_SERVER_SIDE_BYTES_IN : 0

 

| STATISTIC_PVA_SERVER_SIDE_BYTES_OUT : 0

 

| STATISTIC_PVA_SERVER_SIDE_PACKETS_IN : 0

 

| STATISTIC_PVA_SERVER_SIDE_PACKETS_OUT : 0

 

| STATISTIC_PVA_SERVER_SIDE_CURRENT_CONNECTIONS : 0

 

| STATISTIC_PVA_SERVER_SIDE_MAXIMUM_CONNECTIONS : 0

 

| STATISTIC_PVA_SERVER_SIDE_TOTAL_CONNECTIONS : 0

 

| STATISTIC_TOTAL_REQUESTS : 4869

 

| STATISTIC_TOTAL_PVA_ASSISTED_CONNECTIONS : 0

 

| STATISTIC_CURRENT_PVA_ASSISTED_CONNECTIONS : 0

 

 

1 Reply

  • Right now there is no way to make a custom query on the types of stats you would like. You will just have to receive the stats array and loop through the elements until you get the statistics that you are interested in.

     

     

    -Joe