当前位置:网站首页>解决Zabbix用snmp监控网络流量不准的问题
解决Zabbix用snmp监控网络流量不准的问题
2022-07-03 17:48:00 【星哥玩云】
公司新上了一个新的数据中心,需要用zabbix监控华三交换机的网络流量。
配好snmp协议之后,正常都能识别,但慢慢的发现一个问题,电信的接口经常出现少数据的情况,但联通和铁通都没有什么问题。
zabbix绘的图断断续续的,有时更神奇的是,流量突然下降,下降的还很离谱,从500多Mbps一下掉到40多Mbps,一度以为是交换机返回的数据有问题了。
后来在zabbix机器上抓包,发现数据包没有丢,数据也没有什么异常,不过抓的包里面,有个counter32引起注意。
然后仔细阅读snmp的文档,发现snmp协议返回的ifInOctets和ifOutOctets都是流量的总量,而我们都是取两次的差值,然后除以取样的间隔时间,得出的平均值。
而counter32的数据类型计数的最大值是2的32次方减1,当超过4G的时候,计数器就会清零。
后来分析zabbix的snmp interface的模板,发现zabbix取样时间是1分钟,在我们由于流量大,很快就清零了,并且有时计数清零之后新增的数值,比上一次的计数还要大,zabbix还以为没清过零,直接相减除以了时间间隔,就造成了“网络流量陡降的假象”。
找到原因之后,剩下的就好办了,我们需要的是,使用counter64的oid数据。
在zabbix中导出template snmp interfaces模板,然后修改一下名字,重新导入。修改这个新的模板:
在“探索规则”中找到“项目原型”,点击“Incoming traffic on interface {#SNMPVALUE}”,
1.将其“键值”中的ifInOctets[{#SNMPVALUE}]修改为ifHCInOctets[{#SNMPVALUE}]
2.将“SNMP OID”中的IF-MIB::ifInOctets.{#SNMPINDEX}修改为IF-MIB::ifHCInOctets.{#SNMPINDEX}
同样:“项目原型”中的“Outgoing traffic on interface {#SNMPVALUE}”也做类似修改。
也就是将ifInOctets和ifOutOctets替换为ifHCInOctets和ifHCOutOctets。
然后把主机删除,重新添加主机,这次一切都清爽了,绘的图都是连续的,也没再出现陡增陡降的问题。
边栏推荐
- [RT thread] NXP rt10xx device driver framework -- Audio construction and use
- TCP congestion control details | 3 design space
- Mathematical formula (test)
- The third day of writing C language by Yabo people
- Hongmeng third training
- Is AI too slow to design pictures and draw illustrations? 3 sets of practical brushes to save you
- 毕业总结
- Internet hospital his management platform source code, online consultation, appointment registration smart hospital applet source code
- The gbase 8A database does not support the DB2 function value (column_name, 0) cluster syntax
- [combinatorics] recursive equation (the problem of solving recursive equation with multiple roots | the problem is raised)
猜你喜欢
STM32实现74HC595控制
Classroom attendance system based on face recognition tkinter+openpyxl+face_ recognition
List的stream中Long对象与long判等问题记录
Global and Chinese pediatric palliative care drug market development research and investment planning recommendations report 2022-2028
Collection of the most beautiful graduation photos in the graduation season, collection of excellent graduation photos
Qt调节Win屏幕亮度和声音大小
[UE4] brush Arctic pack high quality Arctic terrain pack
Kubernetes resource object introduction and common commands (4)
Play with fancy special effects. This AE super kit is for you
Luogu: p2685 [tjoi2012] Bridge
随机推荐
Swm32 series Tutorial 4 port mapping and serial port application
How to enforce parameters in PowerShell- How do I make parameters mandatory in PowerShell?
Hongmeng fourth training
Gear2021 monthly update - December
Discussion sur la logique de conception et de mise en oeuvre du processus de paiement
[combinatorics] recursive equation (the non-homogeneous part is an exponential function and the bottom is the characteristic root | example of finding a special solution)
Getting started with deops
Kubernetes resource object introduction and common commands (4)
Web-ui automated testing - the most complete element positioning method
Global and Chinese pediatric palliative care drug market development research and investment planning recommendations report 2022-2028
Micro service component sentinel console call
Graduation summary
Notes on problems -- watching videos on edge will make the screen green
TensorBoard快速入门(Pytorch使用TensorBoard)
When absolutely positioned, the element is horizontally and vertically centered
Kubernetes resource object introduction and common commands (V) - (NFS & PV & PVC)
Write a program to process a list container of string type. Find a special value in the container 9.27: and delete it if found. Rewrite the above procedure with deque container.
Internet hospital his management platform source code, online consultation, appointment registration smart hospital applet source code
i++与++i的区别:通俗易懂的讲述他们的区别
AcWing 4489. 最长子序列