Forum Discussion

CChartier's avatar
CChartier
Icon for Nimbostratus rankNimbostratus
May 07, 2015

Individual Pool Member stats needed

Hello,

I've got the API working, and I can can get Pool information like availability, enabled, current connections, and total connections, but is there anyway to get this for an individual pool member?

Right now I'm hitting the following URI:

http://MyF5.com/mgmt/tm/ltm/pool/~ExPartition~Pool_Name/stats

And here's an output of what I can pull:

[entries] => Array
        (
            [activeMemberCnt]   => Array(       [value] => 3)
            [connqAll.ageEdm]   => Array(       [value] => 0)
            [connqAll.ageEma] => Array(         [value] => 0)
            [connqAll.ageHead] => Array(        [value] => 0)
            [connqAll.ageMax] => Array(         [value] => 0)
            [connqAll.depth] => Array(          [value] => 0)
            [connqAll.serviced] => Array(       [value] => 0)
            [connq.ageEdm] => Array(            [value] => 0)
            [connq.ageEma] => Array(            [value] => 0)
            [connq.ageHead] => Array(           [value] => 0)
            [connq.ageMax] => Array(            [value] => 0)
            [connq.depth] => Array(             [value] => 0)
            [connq.serviced] => Array(          [value] => 0)
            [curSessions] => Array(             [value] => 0)
            [minActiveMembers] => Array(        [value] => 0)
            [monitorRule] => Array(             [description] => /ExPartition/Pool_Name_Probe)
            [tmName] => Array(                  [description] => ExPartition/Pool_Name)
            [serverside.bitsIn] => Array(       [value] => 0)
            [serverside.bitsOut] => Array(      [value] => 0)
            [serverside.curConns] => Array(     [value] => 0)
            [serverside.maxConns] => Array(     [value] => 0)
            [serverside.pktsIn] => Array(       [value] => 0)
            [serverside.pktsOut] => Array(      [value] => 0)
            [serverside.totConns] => Array(     [value] => 0)
            [status.availabilityState] => Array([description] => available)
            [status.enabledState] => Array(     [description] => enabled)
            [status.statusReason] => Array(     [description] => The pool is available)
            [totRequests] => Array(             [value] => 0)
        )
)

But how do I get the pool member stats?

  • kunjan's avatar
    kunjan
    Icon for Nimbostratus rankNimbostratus

    Not sure if there is single cmd to get all members stats in a pool. But can get the individual member stats. So may have to list members in a pool first.

    curl -sk -u admin:admin https://MyF5.com/mgmt/tm/ltm/pool/pool_10.3.3.31/members
    curl -sk -u admin:admin https://MyF5.com/mgmt/tm/ltm/pool/pool_10.3.3.31/members/~Common~10.3.3.31:80/stats 
    
  • This is way late but I was able to work out a good couple of filters. The "?expandSubcollections=true" filter will work with many different F5 LTM objects. I like outputs to look pretty and this would not come out formatted nicely from bash so pipe that output! "| jq . -M"

    This filters out ALL pool config attributes and expands all sub-collections to provide state for pool members, etc on one page:

    curl -sk -u admin:admin https://localhost/mgmt/tm/ltm/pool?expandSubcollections=true | jq . -M
    

    This filters out ALL pool and member stats on one page:

    curl -sk -u admin:admin https://localhost/mgmt/tm/ltm/pool/stats?expandSubcollections=true | jq . -M