Module: check_mk
Branch: master
Commit: 5367c24d59f44d8db6e7196e53b9e53040b3b2d1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5367c24d59f44d…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Sep 20 10:44:40 2016 +0200
3807 FIX mssql_counters: fixed crash when the check is unable to parse a timestamp
provided by the plugin
---
.werks/3807 | 9 +++++++++
ChangeLog | 1 +
checks/mssql_counters | 9 ++++++---
3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/.werks/3807 b/.werks/3807
new file mode 100644
index 0000000..6650be8
--- /dev/null
+++ b/.werks/3807
@@ -0,0 +1,9 @@
+Title: mssql_counters: fixed crash when the check is unable to parse a timestamp provided
by the plugin
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i1
+Date: 1474361050
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index acdae50..0b3f494 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -397,6 +397,7 @@
* 3701 FIX: FIX ps.perf graph title for Memory and CPU Usage...
* 3746 FIX: tinkerforge: Keep check from crashing in case of unconfigured params
* 3862 FIX: mknotifyd mknotifyd.connection: New service description (when
enabled)...
+ * 3807 FIX: mssql_counters: fixed crash when the check is unable to parse a timestamp
provided by the plugin
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/mssql_counters b/checks/mssql_counters
index 71ab47d..2f82ba3 100644
--- a/checks/mssql_counters
+++ b/checks/mssql_counters
@@ -145,9 +145,12 @@ def mssql_time_from_counter(info):
return utc_mktime(time.strptime("
".join(line[3:]).split(".")[0],
"%Y-%m-%d %H:%M:%S"))
except ValueError:
- # ... german
- return utc_mktime(time.strptime(" ".join(line[3:]),
- "%d.%m.%Y %H:%M:%S"))
+ try:
+ # ... german
+ return utc_mktime(time.strptime(" ".join(line[3:]),
+ "%d.%m.%Y %H:%M:%S"))
+ except:
+ pass
return None
def check_mssql_counters_transactions(item, params, info):