Module: check_mk
Branch: master
Commit: a0f2045a70b0a62c39d48c277a402b4e346343a6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a0f2045a70b0a6…
Author: Andreas <ab(a)mathias-kettner.de>
Date: Tue Jun 19 09:43:38 2018 +0200
6229 netapp_api_status: now also supports state "ok_with_suppressed"
Some NetApp system seem to report <tt>ok_with_suppressed instead</tt> of
<tt>ok-with-suppressed</tt>.
The check will handle this accordingly.
Change-Id: Ia6cbb3d0bd50c3cd31ffb5d6d38699043c9c7efb
---
.werks/6229 | 14 ++++++++++++++
checks/netapp_api_status | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/6229 b/.werks/6229
new file mode 100644
index 0000000..c7e13af
--- /dev/null
+++ b/.werks/6229
@@ -0,0 +1,14 @@
+Title: netapp_api_status: now also supports state "ok_with_suppressed"
+Level: 1
+Component: checks
+Class: feature
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1529394074
+
+Some NetApp system seem to report <tt>ok_with_suppressed instead</tt> of
<tt>ok-with-suppressed</tt>.
+The check will handle this accordingly.
+
+
diff --git a/checks/netapp_api_status b/checks/netapp_api_status
index baac6b1..6b12646 100644
--- a/checks/netapp_api_status
+++ b/checks/netapp_api_status
@@ -34,7 +34,7 @@ def check_netapp_api_status(item, _no_params, info):
data = dict([line for line in info if len(line) == 2])
if data.get("status"):
- state = data["status"].lower() not in ["ok",
"ok-with-suppressed"] and 2 or 0
+ state = data["status"].lower() not in ["ok",
"ok-with-suppressed", "ok_with_suppressed"] and 2 or 0
yield state, "Status: %s" % data["status"]
del data["status"]