Forum Discussion
How to Monitor sessions/connections in VIP
This is a command line function, so the data will be displayed to standard out. You could encapsulate the response with back ticks though.
val=`tmsh show /ltm pool local-pool members { 10.70.0.1:80 } |grep "| Current Connections" |awk -F" " '{ print $4 }'`
The idea here is to put all of this in a bash script, assign that script to an external monitor, and then assign that external monitor to a "dummy" pool (a pool that isn't assigned to a virtual server). This allows it to function like a cron job and get saved in config backups. You can then follow the above command with an HTTP call to a remote webserver via cURL (assuming you've established a remote server that accepts HTTP requests from the BIG-IP and can record the values sent to it).
Without the awk command, the grep command will output the entire matching line. Example:
| Current Connections 0 -
Since we only want the numeric value, awk separates the line on white space and presents the fourth non-white space value.
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