Module: check_mk
Branch: master
Commit: 8311c055051e18c0eb10f53c93b229f9809c1475
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8311c055051e18…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Sep 18 10:46:52 2013 +0200
Support service state host checks in CMC
---
modules/check_mk.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index f1905b9..1246046 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1438,11 +1438,9 @@ def host_check_command(hostname, ip, is_clust):
return "check-mk-host-ok"
elif value == "agent" or value[0] == "service":
- if monitoring_core == "cmc":
- raise MKGeneralException("Cannot configure host check command for host
<b>%s</b>: "
- "Sorry, host checks of type 'Use status of a service'
"
- "are not implemented in the Check_MK Micro Core" %
hostname)
service = value == "agent" and "Check_MK" or value[1]
+ if monitoring_core == "cmc":
+ return "check-mk-host-service!" + service
command = "check-mk-host-custom-%d" %
(len(hostcheck_commands_to_define) + 1)
hostcheck_commands_to_define.append((command,
'echo "$SERVICEOUTPUT:%s:%s$" && exit
$SERVICESTATEID:%s:%s$' % (hostname, service, hostname, service)))