Module: check_mk
Branch: master
Commit: dc53cb4d19abb62d55e29865e48188268a39b0f3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dc53cb4d19abb6…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Mon Dec 7 10:41:39 2015 +0100
#2867 check_http: client certificate and private key file parameters can now be set in
wato
Users of these parameters should take extra care to verify the file names specified are
valid.
---
.werks/2867 | 9 +++++++++
ChangeLog | 1 +
checks/check_http | 6 ++++++
web/plugins/wato/active_checks.py | 15 +++++++++++++++
4 files changed, 31 insertions(+)
diff --git a/.werks/2867 b/.werks/2867
new file mode 100644
index 0000000..94afa52
--- /dev/null
+++ b/.werks/2867
@@ -0,0 +1,9 @@
+Title: check_http: client certificate and private key file parameters can now be set in
wato
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1449481056
+Class: feature
+
+Users of these parameters should take extra care to verify the file names specified are
valid.
diff --git a/ChangeLog b/ChangeLog
index c0ec42c..0a2671b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -54,6 +54,7 @@
* 2780 cisco_vss: detect this check on newer (15.1) devices
* 2874 netstat_an.bat: Restrict output of connections to TCP, safes performance
* 2866 ewon: Added support for monitoring Wagner OxyReduct devices with their data
exposed through an ewon router...
+ * 2867 check_http: client certificate and private key file parameters can now be set
in wato...
* 2660 FIX: fixed windows agent using the wrong working directory...
* 2664 FIX: ps: Speedup in situation with many matching processes...
* 2661 FIX: windows agent: fixed incomplete process list...
diff --git a/checks/check_http b/checks/check_http
index 85f882d..d1adddc 100644
--- a/checks/check_http
+++ b/checks/check_http
@@ -145,6 +145,12 @@ def check_http_arguments(params):
if settings.get("urlize"):
args += ' -L'
+ if "client_certificate" in settings:
+ args += ' -J %s' % settings["client_certificate"]
+
+ if "private_key" in settings:
+ args += ' -K %s' % settings["private_key"]
+
if not omit_ip:
args = " -I " + address + args
return args
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 8f798f7..6aa2d3c 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -973,6 +973,21 @@ register_rule(group,
"to the checked URL and this
clickable."),
)
),
+ ( "client_certificate",
+ Filename(
+ title = _("Client Certificate File"),
+ help = _("Set the certificate the client uses to
identify itself to the https server. "
+ "Needs to be in PEM format. "
+ "Please be very careful to enter a
valid filename."),
+ )
+ ),
+ ( "private_key",
+ Filename(
+ title = _("Private Key File"),
+ help = _("Set the private key file (PEM format)
matching the client certificate. "
+ "Please be very careful to enter a
valid filename."),
+ )
+ ),
]
),