cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

How to display the current connection count of a particular pool member via REST API

Gur
Nimbostratus
Nimbostratus

Hi all:

 

I want to be able to query the current connection count of a particular pool member via REST API, but with no success. I used the Golang wrapper for the REST API, upon the inspection of the pool member structure there is no option to return information regarding the current connection count. The pool member struct looks like this:

 

type PoolMember struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` AppService string `json:"appService,omitempty"` Partition string `json:"partition,omitempty"` FullPath string `json:"fullPath,omitempty"` Generation int `json:"generation,omitempty"` Address string `json:"address,omitempty"` ConnectionLimit int `json:"connectionLimit,omitempty"` DynamicRatio int `json:"dynamicRatio,omitempty"` InheritProfile string `json:"inheritProfile,omitempty"` Logging string `json:"logging,omitempty"` Monitor string `json:"monitor,omitempty"` PriorityGroup int `json:"priorityGroup,omitempty"` RateLimit string `json:"rateLimit,omitempty"` Ratio int `json:"ratio,omitempty"` Session string `json:"session,omitempty"` State string `json:"state,omitempty"`}

 

Alas, no current connection info, similar situation with the official Python wrapper too... I wonder if this is possible at all through the API. If not, how can I retrieve this info via other type of query, perhaps via CLI? The use case is that I am writing a script to automate certain things which relies on getting the pool member connection count number.

 

Thanks

2 REPLIES 2

cjunior
Nacreous
Nacreous

Hi,

Yes, it is possible in this uri path:

 

/mgmt/tm/ltm/pool/<POOL-NAME>/members/<MEMBER>/stats

 

e.g.

 

curl -k -u "admin:admin" https://192.168.1.245/mgmt/tm/ltm/pool/~Common~my_pool_name/members/~Common~10.10.10.10:80/stats

User guide list here:

https://clouddocs.f5.com/api/icontrol-rest/

 

Regards.

Thanks for your answer, this works!