Module: check_mk
Branch: master
Commit: 0b439e62c3445bee5c13a3ab46f303cd6665ecfa
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0b439e62c3445b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Oct 1 16:35:57 2013 +0200
WATO: configuring non-Smart-PING for CMC
---
modules/check_mk.py | 10 +++++++++-
web/plugins/wato/check_mk_configuration.py | 13 +++++++------
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 9611dd2..2f7bdc0 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1462,10 +1462,18 @@ def host_check_command(hostname, ip, is_clust):
values = host_extra_conf(hostname, host_check_commands)
if values:
value = values[0]
+ elif monitoring_core == "cmc":
+ value = "smart"
else:
value = "ping"
- if value == "ping":
+ if monitoring_core != "cmc" and value == "smart":
+ value = "ping" # avoid problems when switching back to nagios core
+
+ if value == "smart" and not is_clust:
+ return "check-mk-host-smart"
+
+ elif value in [ "ping", "smart" ]:
ping_args = check_icmp_arguments(hostname)
if is_clust and ip: # Do check cluster IP address if one is there
return "check-mk-host-ping!%s" % ping_args
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index 52df834..76a2050 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -1447,12 +1447,13 @@ register_rule(
"whether a host is up. In some cases this is not possible, however.
With this rule "
"you can specify an alternative way of determining the host's
state."),
choices = [
- ( "ping", _("PING (ICMP echo request)") ),
- ( "tcp" , _("TCP Connect"), Integer(label = _("to
port:"), minvalue=1, maxvalue=65535, default_value=80 )),
- ( "ok", _("Always assume host to be up") ),
- ( "agent", _("Use the status of the Check_MK Agent") ),
- ( "service", _("Use the status of the service..."),
TextUnicode(label = ":", size=45, allow_empty=False )),
- ( "custom", _("Use a custom check plugin..."),
PluginCommandLine() ),
+ ( "ping", _("PING (active check with ICMP echo
request)") ),
+ ( "smart", _("Smart PING (only with Check_MK Micro
Core)") ),
+ ( "tcp" , _("TCP Connect"), Integer(label =
_("to port:"), minvalue=1, maxvalue=65535, default_value=80 )),
+ ( "ok", _("Always assume host to be up") ),
+ ( "agent", _("Use the status of the Check_MK Agent")
),
+ ( "service", _("Use the status of the service..."),
TextUnicode(label = ":", size=45, allow_empty=False )),
+ ( "custom", _("Use a custom check plugin..."),
PluginCommandLine() ),
],
default_value = "ping",
html_separator = " ",