Forum Discussion
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
- nitass_89166
Noctilucent
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.U47i8CjNyCQconfig 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
Nimbostratus
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
Nimbostratus
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!
- nitass
Employee
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.U47i8CjNyCQconfig 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
Nimbostratus
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
Nimbostratus
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!
- Alexey_02_15975
Nimbostratus
This is what I need! Thank you!
- nitass
Employee
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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
