Skip to content

SNMP interface traffic (snmp_interface) ​

Reads one network interface over SNMP: traffic in and out in bits per second (64-bit counters where the device has them), errors and discards per second, and the operational status. Rates are unknown for the first poll and after a counter reset.

Channels ​

KeyNameUnitDefault limits
in_bpsTraffic inbit/snone
out_bpsTraffic outbit/snone
in_errors_psErrors inerrors/swarning above 1
out_errors_psErrors outerrors/swarning above 1
in_discards_psDiscards inpackets/swarning above 10
out_discards_psDiscards outpackets/swarning above 10
oper_statusOperational statusnonevalue map below

oper_status values: 1 Up (healthy), 2 Down (Down), 3 Testing, 4 Unknown and 5 Dormant (Warning), 6 Not present and 7 Lower layer down (Down). An interface whose administrative status is "down" (an operator switched it off) is shown as "administratively down" and is not judged by its operational status.

Parameters ​

ParameterDefaultMeaning
if_indexrequiredifIndex when the sensor was added, at least 1.
if_namerequiredThe interface's name (ifName, or ifDescr on devices without ifXTable). This is the identity that survives renumbering. Must not be empty.
if_descrnoneifDescr when the sensor was added, used to recognise a rename.
port161UDP port of the SNMP agent.

Suggested interval: 60 seconds. Credential: SNMP (snmp_v2c or snmp_v3). Discovery fills in the first three parameters for every interface it finds.

On the target ​

SNMP enabled, with a read-only community or v3 user that can read IF-MIB (ifTable, and ifXTable for 64-bit counters), reachable on UDP 161 from the probe host. Counters are read as 64-bit (ifHCInOctets, ifHCOutOctets) when the device offers them, otherwise as 32-bit, which wrap quickly on fast links. Use a short interval for 32-bit counters.

Identity and renumbering ​

Devices may renumber interfaces after a reboot. When the interface at if_index no longer carries if_name, the sensor looks the name up and follows it to its new index (the poll message says so). If the name is gone but ifDescr is unchanged, it records a rename and keeps going. Rates restart after a move.

Failures ​

MessageMeaning
no SNMP answer (kind timeout)The device did not answer within the poll timeout. Check the address, the port, firewalls and the community or user.
this sensor needs an SNMP credential and none is assigned to it or inherited (kind config)Assign an SNMP credential to the sensor or to a group above it.
SNMPv3 authentication failed, the agent answers but ignores every SNMPv3 request ... (kind auth_failed)The v3 user name or one of the passwords is wrong.
interface "..." cannot be found any more ... (kind protocol)The interface was renamed to something else, or removed. Review the sensor and pick the interface again.
interface "..." is ambiguous: N interfaces (...) now carry that name (kind protocol)Several interfaces now share the name. Pick the right one again.

AGPL-3.0-only