centos7之zabbix的监控H3C ER3200G2流量

时间:2023-11-26 13:50:20

1.首先在服务器端安装snmp工具

yum -y install net-snmp-utils snmp-libs snmp-devel snmp

  启动snmpd服务

systemctl start snmpd
systemctl enable snmpd

2、更改配置文件。

vim /etc/snmp/snmpd.conf
com2sec notConfigUser  default       public

group   notConfigGroup v1           notConfigUser
group notConfigGroup v2c notConfigUser view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
view systemview included .1 access notConfigGroup "" any noauth exact all none none proc mountd
proc ntalkd 4
proc sendmail 10 1
disk / 10000
load 12 14 14

重启snmpd服务

systemctl restart snmpd

3.检测与路由器的连通性(注意,这里必须要H3C ER3200G2开启snmp服务的网关路由器IP地址)

打开路由器snmp功能

centos7之zabbix的监控H3C ER3200G2流量

snmpwalk  -v 2c -c private 路由器wan口地址

 SNMPv2-MIB::sysDescr. = STRING: H3C Product Version ERHMG2-MNW100-R1115^M
H3C ERHMG2^M
Copyright(c) - New H3C Technologies Co., Ltd. All rights reserved.
SNMPv2-MIB::sysObjectID. = OID: SNMPv2-SMI::enterprises.25506.1.
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: () days, ::03.00
SNMPv2-MIB::sysContact. = STRING: R&D Hangzhou, New H3C Technologies Co., Ltd.
SNMPv2-MIB::sysName. = STRING: H3C
SNMPv2-MIB::sysLocation. = STRING: Hangzhou, China
SNMPv2-MIB::sysServices. = INTEGER:
SNMPv2-MIB::sysORLastChange. = Timeticks: () ::00.47
SNMPv2-MIB::sysORID. = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID. = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID. = OID: IP-MIB::ip
SNMPv2-MIB::sysORID. = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID. = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID. = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID. = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID. = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr. = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr. = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr. = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr. = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr. = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr. = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr. = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr. = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime. = Timeticks: () ::00.46
SNMPv2-MIB::sysORUpTime. = Timeticks: () ::00.46
SNMPv2-MIB::sysORUpTime. = Timeticks: () ::00.46
SNMPv2-MIB::sysORUpTime. = Timeticks: () ::00.46
SNMPv2-MIB::sysORUpTime. = Timeticks: () ::00.46
SNMPv2-MIB::sysORUpTime. = Timeticks: () ::00.47
SNMPv2-MIB::sysORUpTime. = Timeticks: () ::00.47
SNMPv2-MIB::sysORUpTime. = Timeticks: () ::00.47
IF-MIB::ifNumber. = INTEGER:
IF-MIB::ifIndex. = INTEGER:
IF-MIB::ifIndex. = INTEGER:
IF-MIB::ifIndex. = INTEGER:
IF-MIB::ifIndex. = INTEGER:
IF-MIB::ifIndex. = INTEGER:
IF-MIB::ifIndex. = INTEGER:
IF-MIB::ifDescr. = STRING: WAN1
IF-MIB::ifDescr. = STRING: WAN2
...........................底下还有很多行

4、添加监控项

添加主机群组

centos7之zabbix的监控H3C ER3200G2流量

添加主机

centos7之zabbix的监控H3C ER3200G2流量

添加模板

centos7之zabbix的监控H3C ER3200G2流量

添加成功,但是你会发现图形没有,我这里是已经添加完了

centos7之zabbix的监控H3C ER3200G2流量

点击图形

centos7之zabbix的监控H3C ER3200G2流量

下面这个图可能要等好一会,SNMP才会把信息传过来,所以耐性等它检测出来,然后选择我们要监控的WAN口,然后创建图形。

centos7之zabbix的监控H3C ER3200G2流量

我这里添加图形,选择WAN1口的上传和下载监控项。

centos7之zabbix的监控H3C ER3200G2流量

centos7之zabbix的监控H3C ER3200G2流量

添加完成后预览,确认无误后,点击添加。

centos7之zabbix的监控H3C ER3200G2流量

日常查看。

centos7之zabbix的监控H3C ER3200G2流量