Merge ~jsing/charm-nrpe/+git/nrpe-charm:test into ~nrpe-charmers/charm-nrpe:master

Proposed by Joel Sing
Status: Superseded
Proposed branch: ~jsing/charm-nrpe/+git/nrpe-charm:test
Merge into: ~nrpe-charmers/charm-nrpe:master
Diff against target: 30 lines (+11/-0)
2 files modified
README.md (+2/-0)
files/plugins/check_netlinks.py (+9/-0)
Reviewer Review Type Date Requested Status
NRPE charm developers Pending
Review via email: mp+354618@code.launchpad.net

Commit message

Test change.

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/README.md b/README.md
2index 6251bc7..28ce24c 100644
3--- a/README.md
4+++ b/README.md
5@@ -1,3 +1,5 @@
6+Just a test change...
7+
8 Introduction
9 ============
10
11diff --git a/files/plugins/check_netlinks.py b/files/plugins/check_netlinks.py
12index 59ae6d2..216f448 100755
13--- a/files/plugins/check_netlinks.py
14+++ b/files/plugins/check_netlinks.py
15@@ -40,6 +40,15 @@ def check_iface(iface, skiperror, crit_thr):
16 raise WarnError('WARNING: {} iface does not '
17 'exist'.format(iface))
18 return
19+ except OSError as e:
20+ if metric_key == 'speed' and 'Invalid argument' in str(e) \
21+ and crit_thr['operstate'] == 'down':
22+ FILTER = [f for f in FILTER if f != 'speed']
23+ continue
24+ else:
25+ raise CriticalError('CRITICAL: {} ({} returns '
26+ 'invalid argument)'.format(iface,
27+ metric_key))
28
29 if metric_key == 'operstate' and metric_value != 'up':
30 if metric_value != crit_thr['operstate']:

Subscribers

People subscribed via source and target branches