Operations 11 min read

How to Accurately Monitor Network Device Metrics with Zabbix SNMP

This guide explains how to configure Zabbix 4.4 to monitor network devices such as Huawei and H3C using SNMP, covering system environment setup, metric OIDs, snmpwalk usage, template creation, port traffic aggregation, optical power monitoring, low‑level discovery filtering, and handling 32‑bit versus 64‑bit counter issues.

Ops Development Stories
Ops Development Stories
Ops Development Stories
How to Accurately Monitor Network Device Metrics with Zabbix SNMP

System Environment

Zabbix 4.4, Huawei S7706, H3C S6520-16S‑SI.

Network Device Monitor Metrics

Metrics collected: CPU, Memory, Fans, Network interfaces, Temperature, optical power.

Network Config

Recommend using

snmp-agent

with an ACL to allow only specific addresses for data collection.

<code>snmp-agent
snmp-agent acl 2000
snmp-agent sys-info version v2c
snmp-agent community read cipher public</code>

snmpwalk Config

Zabbix uses the SNMP protocol to gather data via

snmpwalk

.

<code># Find package name
yum provides snmpwalk
# Install
yum -y install net-snmp-utils
# Verify installation
rpm -qa | grep snmp
# Example usage
snmpwalk -v 2c -c public <ip_address>
snmpwalk -v 2c -c public <ip_address> ifDescr
snmpwalk -v 2c -c public <ip_address> system</code>

H3C Metrics OID

<code>#CPU
1.3.6.1.4.1.25506.2.6.1.1.1.1.6
#Memory
1.3.6.1.4.1.25506.2.6.1.1.1.1.8
#Fans
1.3.6.1.4.1.25506.2.6.1.1.1.1.19
#Temperature
1.3.6.1.4.1.25506.2.6.1.1.1.1.12
#Optical power RX
1.3.6.1.4.1.25506.2.70.1.1.1.12
#Optical power TX
1.3.6.1.4.1.25506.2.70.1.1.1.9
#Power status
1.3.6.1.4.1.25506.2.6.1.1.1.1.19</code>

Huawei Metrics OID

<code>#CPU
1.3.6.1.4.1.2011.5.25.31.1.1.1.1.5
#Memory
1.3.6.1.4.1.2011.5.25.31.1.1.1.1.7
#Fans
1.3.6.1.4.1.2011.5.25.31.1.1.10.1.7
#Temperature
1.3.6.1.4.1.2011.5.25.31.1.1.1.1.11
#Optical power RX
1.3.6.1.4.1.2011.5.25.31.1.1.3.1.8
#Optical power TX
1.3.6.1.4.1.2011.5.25.31.1.1.3.1.9</code>

Zabbix Configuration

Add hosts and apply the Huawei and H3C templates.

Set custom macro

{$SNMP_COMMUNITY}=public

.

Automatic discovery interval defaults to 1 h; adjust as needed to avoid excessive load.

Port Traffic Summary

Example items for received and sent traffic aggregation:

<code>last("net.if.in[ifHCInOctets.9]") + last("net.if.in[ifHCInOctets.10]")
last("net.if.out[ifHCOutOctets.9]") + last("net.if.out[ifHCOutOctets.10]")</code>

Network Device Port Optical Power Monitoring

OID for H3C optical power (RX/TX) and example

snmpwalk

commands:

<code># RX power
snmpwalk -v 2c -c public 192.168.1.1 1.3.6.1.4.1.25506.2.70.1.1.1.9
# TX power
snmpwalk -v 2c -c public 192.168.1.1 1.3.6.1.4.1.25506.2.70.1.1.1.12</code>

LLD Template for Specific Ports

Use low‑level discovery to monitor only uplink ports (e.g., 1/0/27, 1/0/28) and reduce alarm noise.

Zabbix SNMP Port Traffic Accuracy Issue

32‑bit counters overflow at 4 GB, causing false drops; switch to 64‑bit counters (

ifHCInOctets

/

ifHCOutOctets

) to obtain correct traffic.

<code># 32‑bit OIDs
.ifInOctets .1.3.6.1.2.1.2.2.1.10
.ifOutOctets .1.3.6.1.2.1.2.2.1.16
# 64‑bit OIDs
.ifHCInOctets .1.3.6.1.2.1.31.1.1.1.6
.ifHCOutOctets .1.3.6.1.2.1.31.1.1.1.10</code>

Template Modules

Template Module Interfaces Simple SNMPv2 (32‑bit) and Template Module Interfaces SNMPv2 (64‑bit) are available for use.

Network MonitoringZabbixSNMPLLDOIDOptical PowerPort Traffic
Ops Development Stories
Written by

Ops Development Stories

Maintained by a like‑minded team, covering both operations and development. Topics span Linux ops, DevOps toolchain, Kubernetes containerization, monitoring, log collection, network security, and Python or Go development. Team members: Qiao Ke, wanger, Dong Ge, Su Xin, Hua Zai, Zheng Ge, Teacher Xia.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.