大网数据广告活动
服务器运维问答

Pulling HTTP codes from a F5 Load Balancer

· 52CE 我爱测

My environment is 4 Ubuntu 14.04 servers running Nginx sitting behind an F5 Load Balancer. They are sending metrics to Datadog and also pulling metrics from the F5 via SNMP to send to Datadog as well. The Dev team has a requireme…

问题原文

原帖链接 · Jeff Gebhardt - MSFT · CC BY-SA 3.0

My environment is 4 Ubuntu 14.04 servers running Nginx sitting behind an F5 Load Balancer. They are sending metrics to Datadog and also pulling metrics from the F5 via SNMP to send to Datadog as well.

The Dev team has a requirement to be able to monitor HTTP codes. I cannot pull them from Nginx on the server side, as that is only possible with Nginx Plus. I had thought about building out some in house solution with reading the access logs and what not, but don't really want to go down that road. So next I looked to the F5, but have been unable to grab them their either.

This OID returns a value of 0: sysStatHttpRequests::1.3.6.1.4.1.3375.2.1.1.2.1.56

Which I know is incorrect as I was sending about 1000 HTTP requests at the VIP a second. The following also returns values of 0:

sysFastHttpStatResp2xxCnt   1.3.6.1.4.1.3375.2.1.1.2.14.16
sysFastHttpStatResp3xxCnt   1.3.6.1.4.1.3375.2.1.1.2.14.17
sysFastHttpStatResp4xxCnt   1.3.6.1.4.1.3375.2.1.1.2.14.18
sysFastHttpStatResp5xxCnt   1.3.6.1.4.1.3375.2.1.1.2.14.19

SNMP is working as I am able to pull other metrics, such as throughput, connections, etc... Anybody have any ideas on how to pull HTTP code metrics in this environment? Or maybe I am completely missing something I need to setup on the F5 in order to do this.

  • F5 Big-IP 3900
  • Version: 12.1.1

EDIT: Solved my own problem. Had to provision AVR on the F5 then apply an HTTP profile to the virtual servers.

已采纳解答

原帖链接 · Jason Rahm · CC BY-SA 3.0

If you don't have the fastHTTP profile applied you won't see stats on that oid. Normal HTTP profiles use these oids:

[root@ltm3:Active:Standalone] mibs # snmptranslate -On F5-BIGIP-SYSTEM-MIB::sysHttpStatResp2xxCnt
.1.3.6.1.4.1.3375.2.1.1.2.4.3
[root@ltm3:Active:Standalone] mibs # snmptranslate -On F5-BIGIP-SYSTEM-MIB::sysHttpStatResp3xxCnt
.1.3.6.1.4.1.3375.2.1.1.2.4.4
[root@ltm3:Active:Standalone] mibs # snmptranslate -On F5-BIGIP-SYSTEM-MIB::sysHttpStatResp4xxCnt
.1.3.6.1.4.1.3375.2.1.1.2.4.5

And if I run ab 10k times against a local vip after resetting the stats and check the 2xx oid, I see:

[root@ltm3:Active:Standalone] mibs # snmpget -v 2c -c public localhost .1.3.6.1.4.1.3375.2.1.1.2.4.3.0
F5-BIGIP-SYSTEM-MIB::sysHttpStatResp2xxCnt.0 = Counter64: 10000

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-01-31)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。