Forum Discussion
APM sesions count per partition
- Dec 03, 2022
Hi Zdnek,
iControl REST-API does unfortunately not have an end-point to show statistical data for a given APM policy.
But TMSH CLI has a command to display active sessions for a given APM policy. See the syntax below:
itacs@(kw-f5-dev)(cfg-sync Standalone)(Active)(/Common)(tmos)# show apm profile access -------------------------------------------------------------- ACCESS Profile: Radius_Policy -------------------------------------------------------------- User Session Statistics: -------------------------------------------------------------- total sessions: 7 total established sessions: 0 current active sessions: 1 current pending sessions: 1 current established sessions: 0 sessions terminated due to user logged out: 3 sessions terminated due to admin termination: 0 sessions terminated due to timeout in evaluation state: 3 sessions terminated due to timeout in established state: 0 sessions terminated due to errors: 0 sessions that resulted in an allow ending: 0 sessions resulted into deny ending: 0 sessions resulted into redirect ending: 0 sessions resulted into redirect ending with session: 0 requests allowed by ACL: 0 requests denied by ACL: 0 -------------------------------------------------------------- Apply Access Policy: Not-Required -------------------------------------------------------------- -------------------------------------------------------------- ACCESS Profile: access -------------------------------------------------------------- User Session Statistics: -------------------------------------------------------------- total sessions: 0 total established sessions: 0 current active sessions: 0 current pending sessions: 0 current established sessions: 0 sessions terminated due to user logged out: 0 sessions terminated due to admin termination: 0 sessions terminated due to timeout in evaluation state: 0 sessions terminated due to timeout in established state: 0 sessions terminated due to errors: 0 sessions that resulted in an allow ending: 0 sessions resulted into deny ending: 0 sessions resulted into redirect ending: 0 sessions resulted into redirect ending with session: 0 requests allowed by ACL: 0 requests denied by ACL: 0 -------------------------------------------------------------- Apply Access Policy: Not-Required --------------------------------------------------------------
If REST is your prefered method to query such data, then you could access those information via:
curl -sku 'admin:admin' -X POST -H "Content-type: application/json" -d "{\"command\":\"run\", \"utilCmdArgs\": \"-c 'tmsh show apm profile access'\"}" https://YOURBIGIP/mgmt/tm/util/bash
You may also write a custom TMSH script to enumerate your partitions, enumerate the included APM Policies, query statistical information and finally output the enumerated infomation in a more compact format (e.g. CSV, JSON, XML, whatever...). The TMSH script may then be called via TMSH CLI or via REST API...
Cheers, Kai
Hi Zdnek,
iControl REST-API does unfortunately not have an end-point to show statistical data for a given APM policy.
But TMSH CLI has a command to display active sessions for a given APM policy. See the syntax below:
itacs@(kw-f5-dev)(cfg-sync Standalone)(Active)(/Common)(tmos)# show apm profile access
--------------------------------------------------------------
ACCESS Profile: Radius_Policy
--------------------------------------------------------------
User Session Statistics:
--------------------------------------------------------------
total sessions: 7
total established sessions: 0
current active sessions: 1
current pending sessions: 1
current established sessions: 0
sessions terminated due to user logged out: 3
sessions terminated due to admin termination: 0
sessions terminated due to timeout in evaluation state: 3
sessions terminated due to timeout in established state: 0
sessions terminated due to errors: 0
sessions that resulted in an allow ending: 0
sessions resulted into deny ending: 0
sessions resulted into redirect ending: 0
sessions resulted into redirect ending with session: 0
requests allowed by ACL: 0
requests denied by ACL: 0
--------------------------------------------------------------
Apply Access Policy: Not-Required
--------------------------------------------------------------
--------------------------------------------------------------
ACCESS Profile: access
--------------------------------------------------------------
User Session Statistics:
--------------------------------------------------------------
total sessions: 0
total established sessions: 0
current active sessions: 0
current pending sessions: 0
current established sessions: 0
sessions terminated due to user logged out: 0
sessions terminated due to admin termination: 0
sessions terminated due to timeout in evaluation state: 0
sessions terminated due to timeout in established state: 0
sessions terminated due to errors: 0
sessions that resulted in an allow ending: 0
sessions resulted into deny ending: 0
sessions resulted into redirect ending: 0
sessions resulted into redirect ending with session: 0
requests allowed by ACL: 0
requests denied by ACL: 0
--------------------------------------------------------------
Apply Access Policy: Not-Required
--------------------------------------------------------------
If REST is your prefered method to query such data, then you could access those information via:
curl -sku 'admin:admin' -X POST -H "Content-type: application/json" -d "{\"command\":\"run\", \"utilCmdArgs\": \"-c 'tmsh show apm profile access'\"}" https://YOURBIGIP/mgmt/tm/util/bash
You may also write a custom TMSH script to enumerate your partitions, enumerate the included APM Policies, query statistical information and finally output the enumerated infomation in a more compact format (e.g. CSV, JSON, XML, whatever...). The TMSH script may then be called via TMSH CLI or via REST API...
Cheers, Kai
Looks like this was the help needed, so I've marked it as an Accepted Solution for future users to more easily find. Thanks, Kai_Wilke!
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