NETWAYS / check_interfaces

Icinga check plugin for network hardware interfaces
GNU General Public License v2.0
11 stars 14 forks source link

use ifName instead of ifDescr #5

Closed phil-or closed 5 years ago

phil-or commented 5 years ago

First, thanks for this great check, saves a lot of Memory instead of use check_nwc_health. We visualize the performancedata from the checks in our Grafana, to see the iftraffic und the erros.

The Option --if-names of the check use ifName instead of ifDescription. If I use this Option, the only change in the Output is, that the interfaces are called "Gi0/0" instead of "GigabitEthernet0/0". Does this Option not mean, that the ifDescription of the networkport should be displayed? Would be helpful, if the ifDescription can be added to the performancedata-output, so you can vizualize the interfaces with their descriptions in Grafana

Output with --if-names: [CRITICAL] Gi0/10 is down performancedata: Gi0/10::check_snmp::inOctets=60007284c

Output without --if-names: [CRITICAL] GigabitEthernet0/10 is down performancedata: GigabitEthernet0-10::check_snmp::inOctets=60007284c

Expected Output: [CRITICAL] Gi0/10 [Description Name of the networkport] is down performancedata: Gi0/10-[Description Name of the networkport]::check_snmp::inOctets=60007284c

mxhash commented 5 years ago

Hi,

exactly what you mentioned. The switch uses the name instead the description:

 -N|--if-names      use ifName instead of ifDescr

I think, this causes a breaking change for the most people. Why do you not use the ifDescr labels only?

Cheers, Marius

phil-or commented 5 years ago

If I use only the ifDescr, the perfdata output looks like:

GigabitEthernet0-10::check_snmp::inOctets=60007284c

This shows me the interface name in the long version, but not the description from the port. We send the perfdata to an influxdb and vizualize it in Grafana. There it would be nice, if the description name get displayed in the graphs. I don't know, how much work it is, to add a new optional Argument to the check, which allows to Display the port description in the perfdata ?

greetings, Phil

mxhash commented 5 years ago

So I don't know either ;-) Problem is, that we can not change the default behaviour because users rely on the default behaviour (as stated in #7) and I have no idea if this is commonly needed. For that reason a 3rd party PR would be nice ;-)

phil-or commented 5 years ago

okay, thanks! We write this Point on our ToDo