Module: check_mk
Branch: master
Commit: 9358e2e5ca9e46007b60f7158ac34917ffb3876d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9358e2e5ca9e46…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Sep 13 09:05:13 2018 +0200
jar_signature: Fixed unused variables
Change-Id: Ib28a570a2930d047f251fd27fa2e1968d8d6bc53
---
checks/jar_signature | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/checks/jar_signature b/checks/jar_signature
index 3f0fe48..999c94c 100644
--- a/checks/jar_signature
+++ b/checks/jar_signature
@@ -92,16 +92,19 @@ def check_jar_signature(item, _no_params, info):
state = 0
if expired_since >= 0:
- state = 2
status_text = "Certificate expired on %s (%s ago) " %
(expiry_date_text, get_age_human_readable(expired_since))
+ state = 2
+
else:
status_text = "Certificate will expire on %s (in %s)" %
(expiry_date_text, get_age_human_readable(-expired_since))
if -expired_since <= crit:
state = 2
- status_txt = "(less than %s)" % (get_age_human_readable(crit))
elif -expired_since <= warn:
state = 1
- status_txt = "(less than %s)" % (get_age_human_readable(warn))
+ if state:
+ status_text += " (warn/crit below %s/%s)" % (
+ get_age_human_readable(warn),
+ get_age_human_readable(crit))
return state, status_text