[icinga-users] Using cluster-zone check for host state

Per-Henrik Lundblom ph at whatever.nu
Tue Nov 24 13:52:44 CET 2015


I'm doing a test spin for migrating my montoring environment to Icinga2.
In general, things are really smooth but unfortunately I ran into a
problem with host state checks. A lot of digging in the mailing list
archive and googling hints that I'm not the first one walk this path.
Still I have no solution for the problem

My setup consists of a master (monitor1) and a few clients (client1,
client2) that are not directly accessible from the master. Thus, the
"hostalive" check cannot be used on monitor1 to verify if client[12] is

Instead I want to use the cluster transport as a way to detect host
state. Therefore I change check_command for the hosts client[12] to
"cluster-zone" which doesn't work. I assume this is because the host
state check_command is run on each host, not on monitor1. Thus, when the
cluster-zone check fails on either client, it is actually detected but
it is not communicated to monitor1 and the client host state remains UP.

Is it possible to somehow force the check_command for client[12] to be
run on monitor1 (I guess not)?

If not, can one use a seperate service check using cluster-zone check
command and use the outcome to set the client[12] host states
independently of the real host state check commands?

Running icinga2 r2.4.0-1 on all machines. Communication between master
and clients are working fine.

Configuration is pushed from monitor1 to the clients. zones.conf as

object Endpoint "monitor1.xyz.com" {
  host = "monitor1.xyz.com"

object Zone "master" {
  endpoints = [ "monitor1.xyz.com" ]

object Zone "global-templates" {
  global = true

object Endpoint "client1.xyz.com" {
      host = "client1.xyz.com"

object Zone "client1.xyz.com" {
  endpoints = [ "client1.xyz.com" ]
  parent = "master"

object Endpoint "client2.xyz.com" {
      host = "client2.xyz.com"

object Zone "client2.xyz.com" {
  endpoints = [ "client2.xyz.com" ]
  parent = "master"

The zones.d/ structure is:



template Host "xyz-host" {
  import "generic-host"

  vars.os = "Linux"

  max_check_attempts = 3
  check_interval = 1m
  retry_interval = 30s

  check_command = "cluster-zone"
  vars.cluster_zone = "master"


object Host "clientX.xyz.com" {
  import "xyz-host"

Best regards,


Per-Henrik Lundblom           email: ph at whatever.nu
phone: +46 707 647050         webpage: www.whatever.nu

More information about the icinga-users mailing list