For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Parveez_70209's avatar
Parveez_70209
Icon for Nimbostratus rankNimbostratus
Sep 17, 2013

How to Monitor sessions/connections in VIP

Hi Team,

 

Need your earnest assistance:

 

  1. Lets say we have a VIP and which is associated with one pool which is comprised of 2 active members.
  2. Wanted to monitor current sessions against each node/active member against that VIP and the results will save somewhere(auto generation to some folder in some server) after some regular time, lets say 1 hour.

how to create this.

 

Thanks and Regards Parveez

 

9 Replies

  • There are a few things to consider in this request.

    1. Session count is a TCP value, so it doesn't necessarily equate to the number of users accessing the system, but rather the number of TCP sessions open.

    2. There are several ways to get metrics from a BIG-IP. There are third party tools (Splunk, System Center, etc.), and several different formats (syslog, SNMP, etc.). Each of these tools can reach in and get the data (via iControl), or receive and aggregate the data (via SNMP, syslog, etc.).

    3. At a minimum, if you just wanted to send this raw TCP data to a server every hour, you could simply create a script that performs a TMSH function

      tmsh show /ltm pool local-pool members { 10.70.0.1:80 } |grep "|   Current Connections" |awk -F" " '{ print $4 }'
      

    and sends that to a remote server via cURL.

  • Hi Kevin,

     

    Lets say: we have 2 active-members( Eg: 1.1.1.1 and 2.2.2.2) in that particular pool named test_app against the VIP we are configuring, can the command can be as below:

     

    tmsh show /ltm pool test_app members { 1.1.1.1:80 } |grep "| Current Connections" |awk -F" " '{ print $4 }'

     

    tmsh show /ltm pool test_app members { 2.2.2.2:80 } |grep "| Current Connections" |awk -F" " '{ print $4 }'

     

    ================If the above is true, kindly assist in understanding the below too:

     

    1. awk -F" " '{ print $4 }'
    2. And where the output will show up where we can gather the information.

    Thanks and Regards Parveez

     

  • 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.

  • Hi Kevin,

     

    Considering your second point in which you suggested:

     

    There are several ways to get metrics from a BIG-IP. There are third party tools (Splunk, System Center, etc.), and several different formats (syslog, SNMP, etc.). Each of these tools can reach in and get the data (via iControl), or receive and aggregate the data (via SNMP, syslog, etc.).

    Planning to monitor the sessions/connections in VIP using Tool Sitescope and using the SNMP Community strings.

     

    In this case, how can we make efficient use of icontrol and which SNMP MIB we can use to make it work.

     

    Thanks an Regards Parveez

     

  • Is this work ?

     

    http://sitescope.tellurian.net/SiteScope/docs/F5SNMPMon.htm

     

  • Can we use the below SNMP MIB OID for monitoring sessions:

     

    snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.28"

     

    Extending same topic again:

     

    Can we do our monitoring or the sessions using the link y configuring the email alaert without using any external tool:

     

    http://support.f5.com/kb/en-us/solutions/public/3000/600/sol3667.html

     

  • The question I believe is not what can be collected (you can collected anything you want), but rather where you're going to store the information and how you're going to use it. The F5's reporting engine isn't as dynamic as some of the third-party tools out there that are specifically designed for data collection and reporting. You can collect anything you want or need from the device, but you'll still need something that can use the data in a meaningful way.

     

    I would be very careful setting up an email alert configuration to send metrics. You could end up with a lot of emails. ;)

     

  • Hi Kevin and F5 community,

     

    Can we check when was the last time f5 VIP was hit? I just need to know the time.

     

    Thanks, R