-
交换机开启svmp协议
<H3C>system-view
[H3C]snmp-agent
[H3C]snmp-agent sys-info version v2
[H3C]snmp-agent community read public
[H3C]snmp-agent trap enable
[H3C]snmp-agent target-host trap address udp-domain 192.168.10.10 udp-port 161 params securityname public v2c
-
验证是否可以远程获取OID信息
snmpwalk -v 2c -c public 交换机ip
-
CPU使用率,温度,电源状态OID获取
查询MIB手册或getif获取OID{1.3.6.1.4.1.25506.2.6.1.1.1.1.6这个是OID}
-
cpu使用率
snmpwalk -v 2c -c public 交换机 1.3.6.1.4.1.25506.2.6.1.1.1.1.6 | grep -v 0$
-
温度
snmpwalk -v 2c -c public your-switch-ip 1.3.6.1.4.1.25506.2.6.1.1.1.1.12 |grep -v 65535$
-
电源状态
snmpwalk -v 2c -c public your-switch-ip 1.3.6.1.4.1.25506.8.35.9.1.2.1.2
-
web面板的配置
-
配置--->模板--->创建模板
-
配置模板宏
进入宏,添加交换机SNMP配置的团体名
-
配置监控项
以Slot1电源状态为例
监控项 | 描述 |
Admin status of interface {#SNMPVALUE} | 端口管理状态 |
Alias of interface {#SNMPVALUE} | 端口别名 |
Description of interface {#SNMPVALUE} | 端口描述 |
Inbound errors on interface {#SNMPVALUE} | 端口接收包错误数 |
Incoming traffic on interface {#SNMPVALUE} | 端口入流量 |
Interface speed of interface {#SNMPVALUE} | 端口速度 |
Operational status of interface {#SNMPVALUE} | 端口操作状态 |
Outbound errors on interface {#SNMPVALUE} | 端口发送包错误数 |
Outgoing traffic on interface {#SNMPVALUE} | 端口出流量 |