Monitoring Combined Network Interface Channels in Zabbix

I decided to add to Zabbix a check of the number of Combined channels of network interfaces, since when loading the server there could be different situations when my scripts changing their number were not always executed or were executed, but the value was reset during the system startup.

By the way, I once wrote a script for checking RX and TX buffers in this article:
Monitoring current RX and TX network interface buffers in Zabbix

If you look at what the command displays:

ethtool -l ens1f0
Channel parameters for ens1f0:
Pre-set maximums:
RX:             0
TX:             0
Other:          1
Combined:       64
Current hardware settings:
RX:             0
TX:             0
Other:          1
Combined:       8

It turns out that we need a digit on line 11, and also delete 10 extra characters and spaces in front of it:

ethtool -l ens1f0 | awk '(NR == 11)' | sed -r 's/^.{10}//'

As a result of the command, the number 8 was displayed, just what we need, respectively, for a network card with two ports, I showed the following in the Zabbix agent configuration:

UserParameter=current_ens1f0_channels,ethtool -l ens1f0 | awk '(NR == 11)' | sed -r 's/^.{10}//'
UserParameter=current_ens1f1_channels,ethtool -l ens1f1 | awk '(NR == 11)' | sed -r 's/^.{10}//'

Accordingly, create data elements “current_ens1f0_channels” and “current_ens1f1_channels”, as well as triggers if their value is not equal to 8, for example:

{ixnfo.com template:current_ens1f0_channels.last(0)}<>8

See also my article:
Distribution of network card interrupts across processor cores

Leave a comment

Leave a Reply