Monitor OVS system interfaces (ie. br-data), which are down (speed file returns "Invalid argument")
Bug #1783741 reported by
Alvaro Uria
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,
link/ether MAC_REDACTED brd ff:ff:ff:ff:ff:ff
# cat /sys/class/
down
# cat /sys/class/
9000
# cat /sys/class/
cat: /sys/class/
For a customer, we want to monitor br-data MTU size, so we need to skip "speed" check when "operstate" is "down".
Related branches
~aluria/charm-nrpe:lp1783741
- Xav Paice (community): Approve
-
Diff: 20 lines (+9/-0)1 file modifiedfiles/plugins/check_netlinks.py (+9/-0)
Changed in nrpe-charm: | |
assignee: | nobody → Alvaro Uría (aluria) |
status: | New → In Progress |
importance: | Undecided → Wishlist |
To post a comment you must log in.
Before the proposed patch:
# sudo -u nagios /usr/local/ lib/nagios/ plugins/ check_netlinks. py -i br-data lib/nagios/ plugins/ check_netlinks. py -i br-data -o down lib/nagios/ plugins/ check_netlinks. py -i br-data -o down -m 9000 ======= ======= ======= ======= ======= ======= ======= ==== lib/nagios/ plugins/ nagios_ plugin3. py", line 32, in try_check lib/nagios/ plugins/ check_netlinks. py", line 37, in check_iface ).strip( ) ======= ======= ======= ======= ======= ======= ======= ====
CRITICAL: br-data link state is down
# sudo -u nagios /usr/local/
CRITICAL: br-data/mtu is 9000 (target: 1500)
# sudo -u nagios /usr/local/
<function check_iface at 0x7f3e89dc72f0> raised unknown exception '<class 'OSError'>'
=======
Traceback (most recent call last):
File "/usr/local/
function(*args, **kwargs)
File "/usr/local/
metric_value = fd.readline(
OSError: [Errno 22] Invalid argument
=======