Forum Discussion

Alexey_02_15975's avatar
Alexey_02_15975
Icon for Nimbostratus rankNimbostratus
Jun 04, 2014

Monitoring LB resopenses count for each HTTP code

Hello!

Device: big-ip ltm 1600 series. I use zabbix to monitor device. I have LB configured on it, and I have to make check of count of particular HTTP codes responses. Is it possibe?

Ex: member1_http_response_200 = x member1_http_response_400 = x member1_http_response_501 = x member1_http_response_503 = x etc..

Load Balancer configured with the device:

monitor http_%NODE%monitor {
   defaults from http
   recv "%STRING%"
   send "GET %URL%"
}
pool %NODE% {
   action on svcdown reselect
   monitor all tcp
   members {
      %MEMBER1%:http {}
      %MEMBER2%:http {}
      %MEMBER3%:http {}
   }
}
virtual %NODE% {
   snat automap
   pool %NODE%
   destination %LB-VIP%:http
   ip protocol tcp
}

Monitoring use SNMP to poll the device

8 Replies

  • I have to make check of count of particular HTTP codes responses. Is it possibe?

    i believe there are a couple of ways. this is an example of istats.

    Introduction to iStats Part 1: Overview by Colin Walker

    https://devcentral.f5.com/articles/introduction-to-istats-part-1-overview.U47i8CjNyCQ
     config
    
    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
    ltm virtual bar {
        destination 172.28.24.10:80
        ip-protocol tcp
        mask 255.255.255.255
        pool foo
        profiles {
            http { }
            tcp { }
        }
        rules {
            qux
        }
        source 0.0.0.0/0
        source-address-translation {
            type automap
        }
        vs-index 41
    }
    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
    ltm rule qux {
        when HTTP_RESPONSE {
      ISTATS::incr "ltm.virtual /Common/bar c HTTP_[HTTP::status]" 1
    }
    }
    
     stats (User-defined section)
    
    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) show ltm virtual bar
    
    ------------------------------------------------------------------
    Ltm::Virtual Server: bar
    ------------------------------------------------------------------
    Status
      Availability     : unknown
      State            : enabled
      Reason           : The children pool member(s) either don't have service checking enabled, or service check results are not available yet
      CMP              : enabled
      CMP Mode         : all-cpus
      Destination      : 172.28.24.10:80
    
    Traffic                             ClientSide  Ephemeral  General
      Bits In                               575.2K          0        -
      Bits Out                                1.1M          0        -
      Packets In                            1000.0          0        -
      Packets Out                           1000.0          0        -
      Current Connections                        0          0        -
      Maximum Connections                      100          0        -
      Total Connections                        200          0        -
      Min Conn Duration/msec                     -          -     4.0K
      Max Conn Duration/msec                     -          -     4.6K
      Mean Conn Duration/msec                    -          -     4.0K
      Total Requests                             -          -      200
    
    SYN Cookies
      Status                         not-activated
      Hardware SYN Cookie Instances              0
      Software SYN Cookie Instances              0
      Current SYN Cache                          0
      SYN Cache Overflow                         0
      Total Software                             0
      Total Software Accepted                    0
      Total Software Rejected                    0
      Total Hardware                             0
      Total Hardware Accepted                    0
    
    CPU Usage Ratio (%)
      Last 5 Seconds                             0
      Last 1 Minute                              0
      Last 5 Minutes                             0
    
    User-defined  Value
      HTTP_200  100
      HTTP_302  100
    
    
    • Alexey_02_15975's avatar
      Alexey_02_15975
      Icon for Nimbostratus rankNimbostratus
      Colin, do you know is it possible to publish this values to SNMP OIDs? Or may be , it is possible to share it with HTTP or some other interface (the goal is to push it to zabbix... no... to let zabbix to pull this values;) )
    • Alexey_02_15975's avatar
      Alexey_02_15975
      Icon for Nimbostratus rankNimbostratus
      Colin, we observered, that we used software version 10.2 , and this version doesn't support ISTATS. Unfortunately we can't upgrade to 11.0 version. Can you suggest another solution? Appreciate your time and thank you in advance!
  • I have to make check of count of particular HTTP codes responses. Is it possibe?

    i believe there are a couple of ways. this is an example of istats.

    Introduction to iStats Part 1: Overview by Colin Walker

    https://devcentral.f5.com/articles/introduction-to-istats-part-1-overview.U47i8CjNyCQ
     config
    
    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
    ltm virtual bar {
        destination 172.28.24.10:80
        ip-protocol tcp
        mask 255.255.255.255
        pool foo
        profiles {
            http { }
            tcp { }
        }
        rules {
            qux
        }
        source 0.0.0.0/0
        source-address-translation {
            type automap
        }
        vs-index 41
    }
    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
    ltm rule qux {
        when HTTP_RESPONSE {
      ISTATS::incr "ltm.virtual /Common/bar c HTTP_[HTTP::status]" 1
    }
    }
    
     stats (User-defined section)
    
    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) show ltm virtual bar
    
    ------------------------------------------------------------------
    Ltm::Virtual Server: bar
    ------------------------------------------------------------------
    Status
      Availability     : unknown
      State            : enabled
      Reason           : The children pool member(s) either don't have service checking enabled, or service check results are not available yet
      CMP              : enabled
      CMP Mode         : all-cpus
      Destination      : 172.28.24.10:80
    
    Traffic                             ClientSide  Ephemeral  General
      Bits In                               575.2K          0        -
      Bits Out                                1.1M          0        -
      Packets In                            1000.0          0        -
      Packets Out                           1000.0          0        -
      Current Connections                        0          0        -
      Maximum Connections                      100          0        -
      Total Connections                        200          0        -
      Min Conn Duration/msec                     -          -     4.0K
      Max Conn Duration/msec                     -          -     4.6K
      Mean Conn Duration/msec                    -          -     4.0K
      Total Requests                             -          -      200
    
    SYN Cookies
      Status                         not-activated
      Hardware SYN Cookie Instances              0
      Software SYN Cookie Instances              0
      Current SYN Cache                          0
      SYN Cache Overflow                         0
      Total Software                             0
      Total Software Accepted                    0
      Total Software Rejected                    0
      Total Hardware                             0
      Total Hardware Accepted                    0
    
    CPU Usage Ratio (%)
      Last 5 Seconds                             0
      Last 1 Minute                              0
      Last 5 Minutes                             0
    
    User-defined  Value
      HTTP_200  100
      HTTP_302  100
    
    
    • Alexey_02_15975's avatar
      Alexey_02_15975
      Icon for Nimbostratus rankNimbostratus
      Colin, do you know is it possible to publish this values to SNMP OIDs? Or may be , it is possible to share it with HTTP or some other interface (the goal is to push it to zabbix... no... to let zabbix to pull this values;) )
    • Alexey_02_15975's avatar
      Alexey_02_15975
      Icon for Nimbostratus rankNimbostratus
      Colin, we observered, that we used software version 10.2 , and this version doesn't support ISTATS. Unfortunately we can't upgrade to 11.0 version. Can you suggest another solution? Appreciate your time and thank you in advance!
  • do you know is it possible to publish this values to SNMP OIDs?

    unfortunately, it is not available through snmp yet. there is rfe. you may open a case to expedite the process.

    ID380761 - RFE: export iStats via SNMP

    in the meantime, you may try stats profile instead but stats has to be predefined (not like istats which can be created on the fly).

    10.0, statistics profiles are not fully CMP compatible. Each TMM instance uses a separate instance of the statistic profile. The cumulative counts are shown in the GUI and when polled via SNMP.
    

    CMP Compatibility

    https://devcentral.f5.com/wiki/iRules.cmpcompatibility.ashx