Module: check_mk
Branch: master
Commit: e020c186c5b70ca6770723825f4b571f9cee498b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e020c186c5b70c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 20 14:19:27 2016 +0100
symantec_av_updates: Now able to deal with dates in form of 09/18/15
---
checks/symantec_av_updates | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/checks/symantec_av_updates b/checks/symantec_av_updates
index 41f0f4a..c577908 100644
--- a/checks/symantec_av_updates
+++ b/checks/symantec_av_updates
@@ -30,6 +30,10 @@
# <<<symantec_av_updates>>>
# 05/15/2015 rev. 1
+# <<<symantec_av_updates>>>
+# 09/18/15 rev. 1
+
+
symantec_av_updates_default_levels = ( 259200, 345600 )
@@ -41,7 +45,10 @@ def check_symantec_av_updates( _no_item, params, info):
warn, crit = params
last_text = info[0][0]
if '/' in last_text:
- last_broken = time.strptime(last_text, "%m/%d/%Y")
+ if len(last_text) == 10:
+ last_broken = time.strptime(last_text, "%m/%d/%Y")
+ else:
+ last_broken = time.strptime(last_text, "%m/%d/%y")
else:
last_broken = time.strptime(last_text, "%d.%m.%Y")