Module: check_mk
Branch: master
Commit: 12fe695f11c33b32ae9c264f2745746bbc8b489f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=12fe695f11c33b…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Dec 17 15:42:13 2015 +0100
#2819 FIX netapp_api_if: now able to detect even more interfaces
The check was unable to detect interfaces with no link-status information.
Some interfaces (especially virtual ones) often simply report an operational-status.
The check now uses the operational-status information in case the link-status is missing.
---
.werks/2819 | 11 +++++++++++
ChangeLog | 1 +
checks/netapp_api_if | 12 +++++++-----
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/.werks/2819 b/.werks/2819
new file mode 100644
index 0000000..ca60395
--- /dev/null
+++ b/.werks/2819
@@ -0,0 +1,11 @@
+Title: netapp_api_if: now able to detect even more interfaces
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1450363196
+Class: fix
+
+The check was unable to detect interfaces with no link-status information.
+Some interfaces (especially virtual ones) often simply report an operational-status.
+The check now uses the operational-status information in case the link-status is
missing.
diff --git a/ChangeLog b/ChangeLog
index aa75dc6..63824c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -161,6 +161,7 @@
* 1317 FIX: fileinfo.groups: Fixed handling of $DATE pattern...
* 2813 FIX: agent_netapp: fixed missing environmental sensor information and
exception with snapshot volumes...
* 2818 FIX: check_mail_loop: now only deletes expected mails and not all mails
matching a specific pattern...
+ * 2819 FIX: netapp_api_if: now able to detect even more interfaces...
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/netapp_api_if b/checks/netapp_api_if
index 715e3bb..e327fd4 100644
--- a/checks/netapp_api_if
+++ b/checks/netapp_api_if
@@ -59,11 +59,13 @@ def netapp_convert_to_if64(info):
vif_list.append(name)
# Reported by Clustermode
- if "link-status" in values:
- if values["link-status"] == "up":
- values["state"] = "1"
- else:
- values["state"] = "2"
+ for status_key in [ "link-status", "operational-status" ]:
+ if status_key in values:
+ if values[status_key] == "up":
+ values["state"] = "1"
+ else:
+ values["state"] = "2"
+ break
# Reported by Clustermode
if "operational-speed" in values: