netlink speed check fail , "invalid argument"

Bug #1993759 reported by Andy Wu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NRPE Charm
New
Undecided
Unassigned

Bug Description

when netlinks option is configured , nagios calls check_netlink in remote host to check interface information

# nagios command
/usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c check_neutron_public -t 10

currently check_netlinks.py check link mtu and speed by reading files from /sys/class/net/<interface>/ directory, this works for most interfaces but not for some virtual-interface that has no speed information

For example , in Kubernetes deployment that use Juniper contrail CNI , contrail charm will create a vhost0 interface which has mtu but no speed information

19: vhost0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 48:df:37:9b:90:68 brd ff:ff:ff:ff:ff:ff

ubuntu@iadaz01skwrk01-k8s:~$ cat /sys/class/net/vhost0/mtu
9000

ubuntu@iadaz01skwrk01-k8s:~$ cat /sys/class/net/vhost0/speed
cat: /sys/class/net/vhost0/speed: Invalid argument

In this case , the check_netlinks.py will fail

ubuntu@iadaz01skwrk01-k8s:~$ python /usr/local/lib/nagios/plugins/check_netlinks.py --iface vhost0 --operstate unknown --mtu 9000
CRITICAL: vhost0 (speed returns invalid argument)

Although not function impacting, Nagios will show critical alarm on this interface

One potential solution is to do speed check only when the option is specified in nrpe netlinks config options, or give user option exclude certain link from speed check

Relevant nrpe config:

ubuntu@fce-tcspreprod:~$ juju config nrpe netlinks
- vhost0 mtu:9000 op:unknown
- < other interface config, skipped >

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.