Module: check_mk
Branch: master
Commit: 9024a5af615906db1c558419865f36cbc310140d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9024a5af615906…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Tue Sep 19 13:46:19 2017 +0200
5134 check_http: Add the option to specify a proxy server in check_http
Change-Id: I21a2dcb71642ec6f7e14f272a2d5eeb359683772
---
.werks/5134 | 10 ++++++++++
checks/check_http | 4 +++-
web/plugins/wato/active_checks.py | 9 +++++++++
3 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/.werks/5134 b/.werks/5134
new file mode 100644
index 0000000..d5d4197
--- /dev/null
+++ b/.werks/5134
@@ -0,0 +1,10 @@
+Title: check_http: Add the option to specify a proxy server in check_http
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1505821515
+Class: feature
+
+
diff --git a/checks/check_http b/checks/check_http
index 5df7432..44f1a62 100644
--- a/checks/check_http
+++ b/checks/check_http
@@ -145,8 +145,10 @@ def check_http_arguments(params):
if settings.get("urlize"):
args += [ '-L' ]
- if not omit_ip:
+ if (not omit_ip) and ("proxy" not in settings):
args = [ "-I", address ] + args
+ elif "proxy" in settings:
+ args = [ "-I", settings["proxy"] ] + args
return args
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 56fcfbb..520bfce 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -989,6 +989,15 @@ register_rule(group,
]
)
),
+ ( "proxy",
+ TextAscii(
+ title = _("Proxy host"),
+ help = _("To use a proxy you have to use the
Port of the proxy, "
+ "specify the virtual host and the URL
to fetch, "
+ "use the HTTP Method CONNECT, and use
SSL/HTTPS "
+ "for the connection")
+ ),
+ ),
( "proxy_auth",
Tuple(
title = _("Proxy-Authorization"),