Module: check_mk
Branch: master
Commit: 895649cd52521030fe68da8a4d749a3fd2f50569
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=895649cd525210…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Mar 11 15:35:21 2015 +0100
check_http: Fix: also support old configuration style now
---
checks/check_http | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/checks/check_http b/checks/check_http
index f335ea4..bc1b130 100644
--- a/checks/check_http
+++ b/checks/check_http
@@ -55,8 +55,12 @@ def check_http_arguments(params):
args += ' -I %s' % quote_shell_string(settings['cert_host'])
if "cert_days" in settings:
- warn, crit = settings["cert_days"]
- args += ' -C %d,%d' % (warn, crit)
+ # legacy behavior
+ if type(settings["cert_days"]) == int:
+ args += ' -C %d' % settings["cert_days"]
+ else:
+ warn, crit = settings["cert_days"]
+ args += ' -C %d,%d' % (warn, crit)
if settings.get("sni"):
args += ' --sni'