[checkmk-commits] Check_MK Git: check_mk: FIX apc_symmetra_test: Fixed case of unkown last test date

Bastian Kuhn bk at mathias-kettner.de
Tue Apr 29 20:23:49 CEST 2014


Module: check_mk
Branch: master
Commit: 2c7a57c36cebbec813b0fae29b050054246f3254
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2c7a57c36cebbec813b0fae29b050054246f3254

Author: Bastian Kuhn <bk at mathias-kettner.de>
Date:   Tue Apr 29 16:29:18 2014 +0200

FIX apc_symmetra_test: Fixed case of unkown last test date

---

 .werks/157               |    8 ++++++++
 ChangeLog                |    1 +
 checks/apc_symmetra_test |    3 +++
 3 files changed, 12 insertions(+)

diff --git a/.werks/157 b/.werks/157
new file mode 100644
index 0000000..33d7c1d
--- /dev/null
+++ b/.werks/157
@@ -0,0 +1,8 @@
+Title: apc_symmetra_test: Fixed case of unkown last test date
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1398781737
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index c88bed1..f56258c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,6 +56,7 @@
     * 0810 FIX: fritz.link: Not inventorizing "unconfigured" interfaces anymore
     * 0154 FIX: zfsget: Fixed inventory of filesystems
     * 0155 FIX: mssql_counters: harded check agains odd agent output
+    * 0157 FIX: apc_symmetra_test: Fixed case of unkown last test date
 
     Multisite:
     * 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled by filter)
diff --git a/checks/apc_symmetra_test b/checks/apc_symmetra_test
index 3b18dca..7392ed6 100644
--- a/checks/apc_symmetra_test
+++ b/checks/apc_symmetra_test
@@ -64,6 +64,9 @@ 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"
+
     month, day, year = map(saveint, LastDiagnosticsDate.split('/'))
     last_diag_date = datetime.date( year, month, day)
     today = datetime.date.today()



More information about the checkmk-commits mailing list