Module: check_mk
Branch: master
Commit: 8c14ba411f46e88b73d8ab3f414d34e460f4c383
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8c14ba411f46e8…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Mon Jun 30 13:07:03 2014 +0200
FIX apc_symmetra_test: Handle unknown date of last self test as intended
If the date of last self test is reported to be unknown, up to now
the check broke. Now unknow status is handled as intended.
---
.werks/996 | 9 +++++++++
ChangeLog | 1 +
checks/apc_symmetra_test | 4 ++--
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.werks/996 b/.werks/996
new file mode 100644
index 0000000..fdacbda
--- /dev/null
+++ b/.werks/996
@@ -0,0 +1,9 @@
+Title: apc_symmetra_test: Handle unknown date of last self test as intended
+Level: 1
+Component: checks
+Version: 1.2.5i5
+Date: 1404126301
+Class: fix
+
+If the date of last self test is reported to be unknown, up to now
+the check broke. Now unknow status is handled as intended.
diff --git a/ChangeLog b/ChangeLog
index 39fba89..57cfc1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,7 @@
* 0944 FIX: oracle_tablespaces: fixed calculation of space left and number of
remaining increments...
* 1032 FIX: check_traceroute: Fix option Use DNS, worked vice versa
* 0171 FIX: hp_blade_psu: Fixed pnp template...
+ * 0996 FIX: apc_symmetra_test: Handle unknown date of last self test as intended...
Multisite:
* 1013 Sort host names naturally, e.g. foobar11 comes after foobar2...
diff --git a/checks/apc_symmetra_test b/checks/apc_symmetra_test
index 7392ed6..c2946c2 100644
--- a/checks/apc_symmetra_test
+++ b/checks/apc_symmetra_test
@@ -64,8 +64,8 @@ def check_apc_test(item, params, info):
DiagnosticsResults = saveint(line[0])
LastDiagnosticsDate = line[1]
- if LastDiagnosticsDate == 'Unkown':
- return 3, "Date of last self test is unkown"
+ if LastDiagnosticsDate == 'Unknown':
+ return 3, "Date of last self test is unknown"
month, day, year = map(saveint, LastDiagnosticsDate.split('/'))
last_diag_date = datetime.date( year, month, day)