Module: check_mk
Branch: master
Commit: e68f1e969106a41dd117c3d77c1dcc670a1afa1d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e68f1e969106a4…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Dec 20 17:37:46 2012 +0100
FIX: mssql_tablespaces: gracefully handle garbled agent output
---
ChangeLog | 1 +
checks/mssql_tablespaces | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f06b749..24819b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -233,6 +233,7 @@
* FIX: postgres_sessions: handle case of no active/no idle sessions
* FIX: winperf_processor: handle parameters "None" (as WATO creates)
* FIX: mssql_counters: remove debug output, fix bytes output
+ * FIX: mssql_tablespaces: gracefully handle garbled agent output
Multisite:
* FIX: performeter_temparature now returns unicode string, because of °C
diff --git a/checks/mssql_tablespaces b/checks/mssql_tablespaces
index 2cb60f1..d2d848b 100644
--- a/checks/mssql_tablespaces
+++ b/checks/mssql_tablespaces
@@ -47,11 +47,15 @@
# 13: uom
def inventory_mssql_tablespaces(info):
- return [ (line[0] + ' ' + line[1], None) for line in info ]
+ inventory = []
+ for line in info:
+ if len(line) > 1:
+ inventory.append((line[0] + ' ' + line[1], None))
+ return inventory
def check_mssql_tablespaces(item, params, info):
for line in info:
- if item != line[0] + ' ' + line[1]:
+ if len(line) < 2 or item != line[0] + ' ' + line[1]:
continue
output = []