Module: check_mk
Branch: master
Commit: b69d2b47b3a8c3873cb46aac6fbac543c4d601fc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b69d2b47b3a8c3…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Feb 13 16:30:19 2017 +0100
4359 FIX mssql_counters: ignore invalid lines
Change-Id: I2a1f8a183f00576978e4cada953a6b23896766fd
---
.werks/4359 | 10 ++++++++++
ChangeLog | 1 +
checks/mssql_counters | 7 ++++++-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/4359 b/.werks/4359
new file mode 100644
index 0000000..cb2a059
--- /dev/null
+++ b/.werks/4359
@@ -0,0 +1,10 @@
+Title: mssql_counters: ignore invalid lines
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i4
+Date: 1486999784
+
+
diff --git a/ChangeLog b/ChangeLog
index 5f8b5ca..b5f7c63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -110,6 +110,7 @@
* 4356 FIX: brocade_fcport: since FW 8.0.* tx/rxwords are no longer available, use
values from FCMGMT-MIB instead
* 4125 FIX: kaspersky_av_client: made fullscan state optional, simplified plugin...
* 4358 FIX: wmi_cpuload: fixed exception handling
+ * 4359 FIX: mssql_counters: ignore invalid lines
Multisite:
* 4169 View action: Default values of sticky, notification and persistent options can
now be configured via global settings....
diff --git a/checks/mssql_counters b/checks/mssql_counters
index 2f82ba3..b6edd79 100644
--- a/checks/mssql_counters
+++ b/checks/mssql_counters
@@ -37,10 +37,14 @@
# MSSQL_SQLEXPRESS:Databases master Transactions/sec 13733
# MSSQL_SQLEXPRESS:Databases master Percent_Log_Used 57
# MSSQL_SQLEXPRESS:Databases master Log_File(s)_Size_(KB)
+# FOOBAR 170
+
def mssql_counters_item(line, add_counter_name):
- obj, counter, instance = line[:3]
+ if len(line) < 3:
+ return None
+ obj, counter, instance = line[:3]
if obj.endswith(':Databases'):
obj = obj[:-10]
@@ -49,6 +53,7 @@ def mssql_counters_item(line, add_counter_name):
else:
return obj + ' ' + instance
+
def inventory_mssql_counters(info, want_counters, perc_w_base, add_counter_name, dflt =
None):
inventory = []
for line in info: