Module: check_mk
Branch: master
Commit: a1e5951ba6f62fa0d2b9aa0ee5d1a09ff92f0141
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a1e5951ba6f62f…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Nov 12 16:43:22 2013 +0100
check_http: Default service description prefix can be avoided
If the check_http service description is prefixed with a caret,
the default prefix HTTP will not be used.
---
.werks/93 | 9 +++++++++
ChangeLog | 1 +
checks/check_http | 6 +++++-
web/plugins/wato/active_checks.py | 3 ++-
4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/.werks/93 b/.werks/93
new file mode 100644
index 0000000..e05753b
--- /dev/null
+++ b/.werks/93
@@ -0,0 +1,9 @@
+Title: check_http: Default service description prefix can be avoided
+Level: 1
+Component: checks
+Version: 1.2.3i7
+Date: 1384270642
+Class: feature
+
+If the check_http service description is prefixed with a caret,
+the default prefix HTTP will not be used.
diff --git a/ChangeLog b/ChangeLog
index 74ee996..defd675 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
* 0090 apc_ats_status: New Check for monitoring APC Automatic Transfer Switches
* 0080 Added new checks for Brocade NetIron MLX switching / routing devices...
* 0091 apc_ats_output: new check for output measurements on APC ATS devices
+ * 0093 check_http: Default service description prefix can be avoided...
* 0024 FIX: cisco_wlc: removed configuration parameter ap_model
* 0065 FIX: veeam_client: check behaviour improved when backup is in progress
* 0066 FIX: veeam_jobs: check behaviour improved when backup is in progress
diff --git a/checks/check_http b/checks/check_http
index a75e64a..7e8b422 100644
--- a/checks/check_http
+++ b/checks/check_http
@@ -122,11 +122,15 @@ def check_http_arguments(params):
args = " -I $HOSTADDRESS$" + args
return args
+def check_http_desc(params):
+ if params[0].startswith("^"):
+ return params[0][1:]
+ return "HTTP %s" % params[0]
active_check_info['http'] = {
"command_line" : '$USER1$/check_http $ARG1$',
"argument_function" : check_http_arguments,
- "service_description" : lambda params: "HTTP %s" % params[0],
+ "service_description" : check_http_desc,
"has_perfdata" : True,
}
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 4b1ccb9..fd22975 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -476,7 +476,8 @@ register_rule(group,
elements = [
TextUnicode(
title = _("Name"),
- help = _("Will be used in the service description"),
+ help = _("Will be used in the service description. If the name
starts with"
+ "a caret (^) the service description will not be prefixed
with HTTP." ),
allow_empty = False),
Alternative(
title = _("Mode of the Check"),