Forum Discussion

Gur's avatar
Gur
Icon for Nimbostratus rankNimbostratus
Feb 20, 2020

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