Module: check_mk
Branch: master
Commit: fe8f8538337573f5d6f5d1b6732be81666f75573
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fe8f8538337573…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 3 20:33:01 2018 +0100
6920 HTTP proxies can now be configured globally
To enable components to connect to external resources in proxied networks
more easily it is now possible to configure several HTTP proxies using the
global setting "HTTP proxies".
Imagine a scenario where your monitoring server is located in your
company internal network and you need to make a connection to a external
HTTP server in the internet while you can only connect to this server
using a proxy server. In the past the most spread option is to either
open the firewall to make the direct connection from the monitoring
server possible or to set the HTTP(S)_PROXY environment variables for
such a call and hope that the program you use for the connection
supports these envrionment variables.
Now it is possible to configure the proxies using the GUI in a central
place and refer to these settings from different parts of your
configuration.
These proxies will be usable by e.g. special agents, notification
scripts and active checks, which need to use a proxy for their work.
As example the pushover notification script has been migrated to support
the global proxy settings.
Note to notification script developers: You have to name the
notification proxy element of the Dictionary parameters valuespec
"proxy_url" to make it work as expected with globally configured
proxies.
Note to special agent and active check developers: There is a new
function available get_http_proxy(http_proxy). Pass the
"http_proxy" value a user configured using the HTTPProxyReference
valuespec to this function an you will get back the proxy URL as string
or None in case no proxy should be set via command line (see "pydoc
cmk_base.check_api.get_http_proxy_for_cmdline" for further information).
CMK-1407
Change-Id: If74ce019b163259366e067dd17ed76e0b54e726a
---
.werks/6920 | 42 ++++++++++++++
cmk/gui/plugins/wato/__init__.py | 2 +
cmk/gui/plugins/wato/check_mk_configuration.py | 66 +++++++++++++++++++++
cmk/gui/plugins/wato/notifications.py | 20 ++++---
cmk/gui/plugins/wato/utils/__init__.py | 49 ++++++++++++++++
cmk/gui/valuespec.py | 59 ++++++++++++-------
cmk_base/check_api.py | 11 ++++
cmk_base/config.py | 30 +++++++++-
cmk_base/default_config/base.py | 1 +
cmk_base/events.py | 17 +++++-
cmk_base/notify.py | 2 +-
tests/unit/cmk/gui/test_watolib.py | 1 +
tests/unit/cmk_base/test_check_api.py | 7 +++
tests/unit/cmk_base/test_config.py | 79 ++++++++++++++++++++------
14 files changed, 336 insertions(+), 50 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=fe8f853833…