From 9dd37cf9bc3c8cce0cb032cbf79c2a7fbaaa9d6e Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 4 Apr 2014 16:22:12 +0200 Subject: [PATCH] Add ITL hostcheck command for sample config. Fixes #5939 --- etc/icinga2/conf.d/generic-host.conf | 20 +------------------- itl/command-common.conf | 10 ++++++++++ 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/etc/icinga2/conf.d/generic-host.conf b/etc/icinga2/conf.d/generic-host.conf index 659071c2d..916044c7a 100644 --- a/etc/icinga2/conf.d/generic-host.conf +++ b/etc/icinga2/conf.d/generic-host.conf @@ -3,25 +3,7 @@ * all hosts should import this template. */ template Host "generic-host" { - check = "ping4" -} - -apply Service "ping4" { - import "generic-service" - - check_command = "ping4" - - assign where "generic-host" in host.templates - ignore where !host.vars.address -} - -apply Service "ping6" { - import "generic-service" - - check_command = "ping6" - - assign where "generic-host" in host.templates - ignore where !host.vars.address6 + check_command = "hostcheck" } template Host "linux-server" { diff --git a/itl/command-common.conf b/itl/command-common.conf index 73e3536e0..b1761d8fe 100644 --- a/itl/command-common.conf +++ b/itl/command-common.conf @@ -63,6 +63,16 @@ object CheckCommand "ping6" { vars.timeout = 0 } +object CheckCommand "hostcheck" { + import "ping4" + + vars.wrta = 3000.0, + vars.wpl = 80, + + vars.crta = 5000.0, + vars.cpl = 100 +} + object CheckCommand "dummy" { import "plugin-check-command",