Module: check_mk
Branch: master
Commit: 91fb977c212575e3e65b9a8108b1a1ad83855528
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=91fb977c212575…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Mon Feb 3 13:51:01 2014 +0100
emcvnx_raidgroups: did fail on very first check with an index out of range exception
---
checks/emcvnx_raidgroups | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/checks/emcvnx_raidgroups b/checks/emcvnx_raidgroups
index dffb854..6b559a9 100644
--- a/checks/emcvnx_raidgroups
+++ b/checks/emcvnx_raidgroups
@@ -201,7 +201,9 @@ def check_emcvnx_raidgroups_capacity(item, params, info):
# variable name in perfdata is not allowed to be just a number
# especially 0 does not work, so prefix it generally with "rg"
rc, message, perfdata = df_check_filesystem_list(item, params, fslist)
- perfdata[0] = ("rg" + perfdata[0][0], perfdata[0][1], perfdata[0][2],
perfdata[0][3], perfdata[0][4], perfdata[0][5])
+ # note: on very first run perfdata is empty
+ if len(perfdata) > 0:
+ perfdata[0] = ("rg" + perfdata[0][0], perfdata[0][1], perfdata[0][2],
perfdata[0][3], perfdata[0][4], perfdata[0][5])
return rc, message, perfdata