Monitor OVS system interfaces (ie. br-data), which are down (speed file returns "Invalid argument")

Bug #1783741 reported by Alvaro Uria
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NRPE Charm
Fix Released
Wishlist
Alvaro Uria

Bug Description

# ip l l br-data
59: br-data: <BROADCAST,MULTICAST> mtu 9000 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether MAC_REDACTED brd ff:ff:ff:ff:ff:ff

# cat /sys/class/net/br-data/operstate
down
# cat /sys/class/net/br-data/mtu
9000
# cat /sys/class/net/br-data/speed
cat: /sys/class/net/br-data/speed: Invalid argument

For a customer, we want to monitor br-data MTU size, so we need to skip "speed" check when "operstate" is "down".

Related branches

Alvaro Uria (aluria)
Changed in nrpe-charm:
assignee: nobody → Alvaro Uría (aluria)
status: New → In Progress
importance: Undecided → Wishlist
Revision history for this message
Alvaro Uria (aluria) wrote :

Before the proposed patch:

# sudo -u nagios /usr/local/lib/nagios/plugins/check_netlinks.py -i br-data
CRITICAL: br-data link state is down
# sudo -u nagios /usr/local/lib/nagios/plugins/check_netlinks.py -i br-data -o down
CRITICAL: br-data/mtu is 9000 (target: 1500)
# sudo -u nagios /usr/local/lib/nagios/plugins/check_netlinks.py -i br-data -o down -m 9000
<function check_iface at 0x7f3e89dc72f0> raised unknown exception '<class 'OSError'>'
============================================================
Traceback (most recent call last):
  File "/usr/local/lib/nagios/plugins/nagios_plugin3.py", line 32, in try_check
    function(*args, **kwargs)
  File "/usr/local/lib/nagios/plugins/check_netlinks.py", line 37, in check_iface
    metric_value = fd.readline().strip()
OSError: [Errno 22] Invalid argument
============================================================

Revision history for this message
Xav Paice (xavpaice) wrote :

Released in cs:nrpe-50

Changed in nrpe-charm:
status: In Progress → Fix Released
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.