# Interfaces Simple SNMP ## Overview For Zabbix version: 6.0 and higher ## Setup Refer to the vendor documentation. ## Zabbix configuration No specific Zabbix configuration is required. ### Macros used |Name|Description|Default| |----|-----------|-------| |{$IF.ERRORS.WARN} |

-

|`2` | |{$IF.UTIL.MAX} |

-

|`95` | |{$IFCONTROL} |

-

|`1` | |{$NET.IF.IFADMINSTATUS.MATCHES} |

Ignore notPresent(6)

|`^.*` | |{$NET.IF.IFADMINSTATUS.NOT_MATCHES} |

Ignore down(2) administrative status

|`^2$` | |{$NET.IF.IFDESCR.MATCHES} |

-

|`.*` | |{$NET.IF.IFDESCR.NOT_MATCHES} |

-

|`CHANGE_IF_NEEDED` | |{$NET.IF.IFNAME.MATCHES} |

-

|`^.*$` | |{$NET.IF.IFNAME.NOT_MATCHES} |

Filter out loopbacks, nulls, docker veth links and docker0 bridge by default

|`(^Software Loopback Interface|^NULL[0-9.]*$|^[Ll]o[0-9.]*$|^[Ss]ystem$|^Nu[0-9.]*$|^veth[0-9a-z]+$|docker[0-9]+|br-[a-z0-9]{12})` | |{$NET.IF.IFOPERSTATUS.MATCHES} |

-

|`^.*$` | |{$NET.IF.IFOPERSTATUS.NOT_MATCHES} |

Ignore notPresent(6)

|`^6$` | |{$NET.IF.IFTYPE.MATCHES} |

-

|`.*` | |{$NET.IF.IFTYPE.NOT_MATCHES} |

-

|`CHANGE_IF_NEEDED` | ## Template links There are no template links in this template. ## Discovery rules |Name|Description|Type|Key and additional info| |----|-----------|----|----| |Network interfaces discovery |

Discovering interfaces from IF-MIB.

|SNMP |net.if.discovery

**Filter**:

AND

- {#IFADMINSTATUS} MATCHES_REGEX `{$NET.IF.IFADMINSTATUS.MATCHES}`

- {#IFADMINSTATUS} NOT_MATCHES_REGEX `{$NET.IF.IFADMINSTATUS.NOT_MATCHES}`

- {#IFOPERSTATUS} MATCHES_REGEX `{$NET.IF.IFOPERSTATUS.MATCHES}`

- {#IFOPERSTATUS} NOT_MATCHES_REGEX `{$NET.IF.IFOPERSTATUS.NOT_MATCHES}`

- {#IFNAME} MATCHES_REGEX `{$NET.IF.IFNAME.MATCHES}`

- {#IFNAME} NOT_MATCHES_REGEX `{$NET.IF.IFNAME.NOT_MATCHES}`

- {#IFDESCR} MATCHES_REGEX `{$NET.IF.IFDESCR.MATCHES}`

- {#IFDESCR} NOT_MATCHES_REGEX `{$NET.IF.IFDESCR.NOT_MATCHES}`

- {#IFTYPE} MATCHES_REGEX `{$NET.IF.IFTYPE.MATCHES}`

- {#IFTYPE} NOT_MATCHES_REGEX `{$NET.IF.IFTYPE.NOT_MATCHES}`

| ## Items collected |Group|Name|Description|Type|Key and additional info| |-----|----|-----------|----|---------------------| |Network interfaces |Interface {#IFDESCR}: Operational status |

MIB: IF-MIB

The current operational state of the interface.

- The testing(3) state indicates that no operational packet scan be passed

- If ifAdminStatus is down(2) then ifOperStatus should be down(2)

- If ifAdminStatus is changed to up(1) then ifOperStatus should change to up(1) if the interface is ready to transmit and receive network traffic

- It should change todormant(5) if the interface is waiting for external actions (such as a serial line waiting for an incoming connection)

- It should remain in the down(2) state if and only if there is a fault that prevents it from going to the up(1) state

- It should remain in the notPresent(6) state if the interface has missing(typically, hardware) components.

|SNMP |net.if.status[ifOperStatus.{#SNMPINDEX}] | |Network interfaces |Interface {#IFDESCR}: Bits received |

MIB: IF-MIB

The total number of octets received on the interface,including framing characters. Discontinuities in the value of this counter can occurat re-initialization of the management system, and atother times as indicated by the value of ifCounterDiscontinuityTime.

|SNMP |net.if.in[ifInOctets.{#SNMPINDEX}]

**Preprocessing**:

- CHANGE_PER_SECOND

- MULTIPLIER: `8`

| |Network interfaces |Interface {#IFDESCR}: Bits sent |

MIB: IF-MIB

The total number of octets transmitted out of the interface, including framing characters. Discontinuities in the value of this counter can occurat re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.

|SNMP |net.if.out[ifOutOctets.{#SNMPINDEX}]

**Preprocessing**:

- CHANGE_PER_SECOND

- MULTIPLIER: `8`

| |Network interfaces |Interface {#IFDESCR}: Inbound packets with errors |

MIB: IF-MIB

For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.

|SNMP |net.if.in.errors[ifInErrors.{#SNMPINDEX}]

**Preprocessing**:

- CHANGE_PER_SECOND

| |Network interfaces |Interface {#IFDESCR}: Outbound packets with errors |

MIB: IF-MIB

For packet-oriented interfaces, the number of outbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of outbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime.

|SNMP |net.if.out.errors[ifOutErrors.{#SNMPINDEX}]

**Preprocessing**:

- CHANGE_PER_SECOND

| |Network interfaces |Interface {#IFDESCR}: Outbound packets discarded |

MIB: IF-MIB

The number of outbound packets which were chosen to be discarded

even though no errors had been detected to prevent their being deliverable to a higher-layer protocol.

One possible reason for discarding such a packet could be to free up buffer space.

Discontinuities in the value of this counter can occur at re-initialization of the management system,

and at other times as indicated by the value of ifCounterDiscontinuityTime.

|SNMP |net.if.out.discards[ifOutDiscards.{#SNMPINDEX}]

**Preprocessing**:

- CHANGE_PER_SECOND

| |Network interfaces |Interface {#IFDESCR}: Inbound packets discarded |

MIB: IF-MIB

The number of inbound packets which were chosen to be discarded

even though no errors had been detected to prevent their being deliverable to a higher-layer protocol.

One possible reason for discarding such a packet could be to free up buffer space.

Discontinuities in the value of this counter can occur at re-initialization of the management system,

and at other times as indicated by the value of ifCounterDiscontinuityTime.

|SNMP |net.if.in.discards[ifInDiscards.{#SNMPINDEX}]

**Preprocessing**:

- CHANGE_PER_SECOND

| |Network interfaces |Interface {#IFDESCR}: Interface type |

MIB: IF-MIB

The type of interface.

Additional values for ifType are assigned by the Internet Assigned NumbersAuthority (IANA),

through updating the syntax of the IANAifType textual convention.

|SNMP |net.if.type[ifType.{#SNMPINDEX}]

**Preprocessing**:

- DISCARD_UNCHANGED_HEARTBEAT: `1d`

| |Network interfaces |Interface {#IFDESCR}: Speed |

MIB: IF-MIB

An estimate of the interface's current bandwidth in bits per second.

For interfaces which do not vary in bandwidth or for those where no accurate estimation can be made,

this object should contain the nominal bandwidth.

If the bandwidth of the interface is greater than the maximum value reportable by this object then

this object should report its maximum value (4,294,967,295) and ifHighSpeed must be used to report the interace's speed.

For a sub-layer which has no concept of bandwidth, this object should be zero.

|SNMP |net.if.speed[ifSpeed.{#SNMPINDEX}] | ## Triggers |Name|Description|Expression|Severity|Dependencies and additional info| |----|-----------|----|----|----| |Interface {#IFDESCR}: Link down |

This trigger expression works as follows:

1. Can be triggered if operations status is down.

2. {$IFCONTROL:"{#IFNAME}"}=1 - user can redefine Context macro to value - 0. That marks this interface as not important. No new trigger will be fired if this interface is down.

3. {TEMPLATE_NAME:METRIC.diff()}=1) - trigger fires only if operational status was up(1) sometime before. (So, do not fire 'ethernal off' interfaces.)

WARNING: if closed manually - won't fire again on next poll, because of .diff.

|`{$IFCONTROL:"{#IFNAME}"}=1 and last(/Interfaces Simple SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])=2 and (last(/Interfaces Simple SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#1)<>last(/Interfaces Simple SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#2))`

Recovery expression:

`last(/Interfaces Simple SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])<>2 or {$IFCONTROL:"{#IFNAME}"}=0` |AVERAGE |

Manual close: YES

| |Interface {#IFDESCR}: High bandwidth usage (>{$IF.UTIL.MAX:"{#IFNAME}"}%) |

The network interface utilization is close to its estimated maximum bandwidth.

|`(avg(/Interfaces Simple SNMP/net.if.in[ifInOctets.{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/Interfaces Simple SNMP/net.if.speed[ifSpeed.{#SNMPINDEX}]) or avg(/Interfaces Simple SNMP/net.if.out[ifOutOctets.{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/Interfaces Simple SNMP/net.if.speed[ifSpeed.{#SNMPINDEX}])) and last(/Interfaces Simple SNMP/net.if.speed[ifSpeed.{#SNMPINDEX}])>0`

Recovery expression:

`avg(/Interfaces Simple SNMP/net.if.in[ifInOctets.{#SNMPINDEX}],15m)<(({$IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*last(/Interfaces Simple SNMP/net.if.speed[ifSpeed.{#SNMPINDEX}]) and avg(/Interfaces Simple SNMP/net.if.out[ifOutOctets.{#SNMPINDEX}],15m)<(({$IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*last(/Interfaces Simple SNMP/net.if.speed[ifSpeed.{#SNMPINDEX}])` |WARNING |

Manual close: YES

**Depends on**:

- Interface {#IFDESCR}: Link down

| |Interface {#IFDESCR}: High error rate (>{$IF.ERRORS.WARN:"{#IFNAME}"} for 5m) |

Recovers when below 80% of {$IF.ERRORS.WARN:"{#IFNAME}"} threshold

|`min(/Interfaces Simple SNMP/net.if.in.errors[ifInErrors.{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} or min(/Interfaces Simple SNMP/net.if.out.errors[ifOutErrors.{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"}`

Recovery expression:

`max(/Interfaces Simple SNMP/net.if.in.errors[ifInErrors.{#SNMPINDEX}],5m)<{$IF.ERRORS.WARN:"{#IFNAME}"}*0.8 and max(/Interfaces Simple SNMP/net.if.out.errors[ifOutErrors.{#SNMPINDEX}],5m)<{$IF.ERRORS.WARN:"{#IFNAME}"}*0.8` |WARNING |

Manual close: YES

**Depends on**:

- Interface {#IFDESCR}: Link down

| |Interface {#IFDESCR}: Ethernet has changed to lower speed than it was before |

This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Ack to close.

|`change(/Interfaces Simple SNMP/net.if.speed[ifSpeed.{#SNMPINDEX}])<0 and last(/Interfaces Simple SNMP/net.if.speed[ifSpeed.{#SNMPINDEX}])>0 and ( last(/Interfaces Simple SNMP/net.if.type[ifType.{#SNMPINDEX}])=6 or last(/Interfaces Simple SNMP/net.if.type[ifType.{#SNMPINDEX}])=7 or last(/Interfaces Simple SNMP/net.if.type[ifType.{#SNMPINDEX}])=11 or last(/Interfaces Simple SNMP/net.if.type[ifType.{#SNMPINDEX}])=62 or last(/Interfaces Simple SNMP/net.if.type[ifType.{#SNMPINDEX}])=69 or last(/Interfaces Simple SNMP/net.if.type[ifType.{#SNMPINDEX}])=117 ) and (last(/Interfaces Simple SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])<>2) `

Recovery expression:

`(change(/Interfaces Simple SNMP/net.if.speed[ifSpeed.{#SNMPINDEX}])>0 and last(/Interfaces Simple SNMP/net.if.speed[ifSpeed.{#SNMPINDEX}],#2)>0) or (last(/Interfaces Simple SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])=2) ` |INFO |

Manual close: YES

**Depends on**:

- Interface {#IFDESCR}: Link down

| ## Feedback Please report any issues with the template at https://support.zabbix.com ## Known Issues - Description: 32bit counters are used in this template (since there is no ifXtable available). If busy interfaces return incorrect bits sent/received - set update interval to 1m or less.