I discovered a problem with how Zabbix 7.4.1 handles network nic names.
In a trivial case, say a virtual machine or a physical machine with only one integrated (motherboard) NIC, the names are handled correctly.
But for my server with a mix of integrated and PCI-card extended, the names are of different length and this does not seem to work.
In my case i have: eno1, enp1s0f0 and enp1s0f1. But Zabbix does not see eno1 nor properly identifies the other two.
In Zabbix I see enp1s0 as the only NIC, and it does not work. (Neither does this WYSIWYG editor :-) )
I then tried to add my own tailored item, but got an error "Cannot find information for this network interface in /proc/net/dev".
Investigating, I see the nics are seen in the /proc/net/dev - file as:
Paying attention to the formatting it seems that the indent is inconsistent, which could explain the failure to detect.
I have experienced similar problems in my own code, where tools made assumptions regarding the length of the NIC-names.
The first entry is aligned with an old assumption about the length of NIC-name (so is 'lo:' ) and the two other is overflowing with 2.
By the way, the NIC from any extention-card nowadays has the format similar to enpXsYfZ, which appears to be related to addressing a PCI-slot.
Given that, I need a quick work around, since I'm new to Zabbix, and the structure of the documentation makes it hard for me to read (sight problem).
How do I get the metrics I need? I need rate of traffic in and out for the NIC's above.
Do I try to add my own item? Change something in templates or what is a good approach?
Tanx in advance...
In a trivial case, say a virtual machine or a physical machine with only one integrated (motherboard) NIC, the names are handled correctly.
But for my server with a mix of integrated and PCI-card extended, the names are of different length and this does not seem to work.
In my case i have: eno1, enp1s0f0 and enp1s0f1. But Zabbix does not see eno1 nor properly identifies the other two.
In Zabbix I see enp1s0 as the only NIC, and it does not work. (Neither does this WYSIWYG editor :-) )
I then tried to add my own tailored item, but got an error "Cannot find information for this network interface in /proc/net/dev".
Investigating, I see the nics are seen in the /proc/net/dev - file as:
Code:
eno1: #### #### enp1s0f0: #### #### enp1s0f1: #### ####
I have experienced similar problems in my own code, where tools made assumptions regarding the length of the NIC-names.
The first entry is aligned with an old assumption about the length of NIC-name (so is 'lo:' ) and the two other is overflowing with 2.
By the way, the NIC from any extention-card nowadays has the format similar to enpXsYfZ, which appears to be related to addressing a PCI-slot.
Given that, I need a quick work around, since I'm new to Zabbix, and the structure of the documentation makes it hard for me to read (sight problem).
How do I get the metrics I need? I need rate of traffic in and out for the NIC's above.
Do I try to add my own item? Change something in templates or what is a good approach?
Tanx in advance...
Comment