Module: check_mk
Branch: master
Commit: 334cf6bbdba5775be9e4615c99136b67553e4baa
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=334cf6bbdba577…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Mar 26 15:05:49 2014 +0100
FIX megaraid_ldisks: now able to handle "No Virtual Drive Configured" states
The check no longer crashes if the agent section contains lines like:<br>
Adapter 1: No Virtual Drive Configured.
---
.werks/737 | 10 ++++++++++
ChangeLog | 1 +
checks/megaraid_ldisks | 3 ++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/737 b/.werks/737
new file mode 100644
index 0000000..2601cc5
--- /dev/null
+++ b/.werks/737
@@ -0,0 +1,10 @@
+Title: megaraid_ldisks: now able to handle "No Virtual Drive Configured"
states
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1395842658
+
+The check no longer crashes if the agent section contains lines like:<br>
+Adapter 1: No Virtual Drive Configured.
diff --git a/ChangeLog b/ChangeLog
index c7e0714..9498b65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -235,6 +235,7 @@
* 0593 FIX: zypper: agent plugin and check now lead to UNKNOWN result in case of repo
problems
* 0758 FIX: check_sql: Fixed monitoring of stored procedures with oracle
* 0599 FIX: esx_vsphere_datastores: provisioning levels in WATO are no longer limited
to 101%
+ * 0737 FIX: megaraid_ldisks: now able to handle "No Virtual Drive
Configured" states...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checks/megaraid_ldisks b/checks/megaraid_ldisks
index c6c7d29..c01e047 100644
--- a/checks/megaraid_ldisks
+++ b/checks/megaraid_ldisks
@@ -48,7 +48,8 @@ def inventory_megaraid_ldisks(info):
def check_megaraid_ldisks(item, _no_params, info):
adapter = None
for line in info:
- if line[0] == "Adapter":
+ l = ' '.join(line)
+ if line[0] == "Adapter" and not l.endswith('No Virtual Drive
Configured.'):
adapter = int(line[1])
elif line[0] == "Virtual" and (line[1] == "Disk:" or line[1]
== "Drive:"):
disk = int(line[2])