Forum Discussion
How to display the current connection count of a particular pool member via REST API
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
- cjunior
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.
- Gur
Nimbostratus
Thanks for your answer, this works!
Recent Discussions
Related Content
* 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