Forum Discussion

Daniel_Hoernlei's avatar
Daniel_Hoernlei
Icon for Nimbostratus rankNimbostratus
Jun 16, 2016

Get connection table entries (or subset) when connection table is large via iControl

I've used the:

 

System::Connections::get_list

 

iControl method via SOAP to get a list of all connections in the connection table, and it works okay most of the time except when the connection table is large (>20,000), when I get the error:

 

SOAP-ENV:Server Exception caught in System::urn:iControl:System/Connections::get_list() Exception: Common::OperationFailed primary_error_code : 16908292 (0x01020004) secondary_error_code : 0 error_string : Unable to complete request

 

In most cases, I don't even want the entire table, but some subset like you can get from a tmsh command (e.g. tmsh show /sys connection ss-server-addr ss-server-port to show all active connections to pool member listening on specified and ). I've tried using methods:

 

System::Connections::get_active_connection (v10 or less)

 

System::Connections::get_active_connection_v2 (v11 or greater)

 

and unfortunately it appears that 'connections' parameter requires that all member parameters be supplied (clientside_client, clientside_server, serverside_server, and protocol), even though all I'm really interested in matching one of the parameters (e.g. 'clientside_server'), the other parameters are 'don't cares' (or wildcards) as far as I am concerned. I tried using address '0.0.0.0' (and also '', '.*..', undef (which apparently means 'null' in perl)) and port '0' for clientside_client and serverside_server (and setting protocol to 'PROTOCOL_ANY'), however, it apparently takes those literally (rather than treating them as a wildcards) and returns only mirrored connections, which apparently use '0.0.0.0' and '0'. I found a few DevCentral Q/As where people were trying to do the same thing (for example):

 

https://devcentral.f5.com/questions/how-can-i-dump-the-connection-table-and-persistence-table-by-icontrol-api

 

but no one responded to their questions so I can only assume that wildcards essentially can't be used, which is unfortunate since the equivalent tmsh command allows you to specify only clientside_client, clientside_server, and/or serverside_server parameters without complaining.

 

Does anyone else have any tricks to achieve what I'm trying to do?

 

1 Reply

  • Hello Daniel,

     

    will dig into it. i am able to do it with the REST api : /mgmt/tm/sys/connection?ver=12.1.0&options=cs-Client-Addr 172.16.20.15.

     

    REST API support pagination as well.