Passive check result submission on agent

i am trying to add “passive checks” which i’d like to submit on the agent (Every agent should be able to submit passive checks to localhost). The problem now is that the passive checks config is not distributed to the agent (No object in icinga2 object list) so submission to the agents API causes a 500 as host/service is unknown.

Is there a way to let individual service be replicated to the agent and not only beeing scheduled on the master?


Hmm, no idea whether this will work at all. To test it you need at least create host and service objects locally, add an apiuser and enable api.

Using the API/a local user works. Authentication is not my issue. The issue is that the local agent has no clue about itself or the service as the host is deployed in the “master” zone not in the zone of the host.

So i have endpoint “foo” and zone “foo”. I have host “foo” which is in zone “master”.

So object list on the agent shows the agent has no clue about itself, thus i cannot update the service with a state.

Does the director allow hosts beeing in their own zone thus replicating the config and letting the agent know about itself?


It’s not only for the director it’s even not supported for icinga itself. However, it’s working as I’ve described here.

I am a little puzzled because i have a different setup with manual config. And when i dump the object list on the master:

Object '' of type 'Zone':
  * endpoints = [ "" ]

Object '' of type 'Endpoint':
   * host = ""

Object '' of type 'Host':
  * zone = ""

In this setup i of course see the objects for - So the host is endpoint for a zone, and is in that zone aswell.

In my directory based setup i see the zone (Name equals the hostname) and an Endpoint Config (Equals the hostname) and the host beeing in zone “master”. Thus the agent itself does no have its own setup.

Here the object dump (from master) on the director based setup:

Object 'svrb-ncws1-prd' of type 'Zone':
  * endpoints = [ "svrb-ncws1-prd" ]
Object 'svrb-ncws1-prd' of type 'Endpoint':
Object 'svrb-ncws1-prd' of type 'Host':
  * zone = "master"

Looking at an object dump on THAT agent:

Object 'svrb-ncws1-prd' of type 'Zone':
  * endpoints = [ "svrb-ncws1-prd" ]
Object 'svrb-ncws1-prd' of type 'Endpoint':

but there is no host object. This is correct because its in zone “master” which is not to be replicated as its non-global.

So the agent itself does not have any clue about itself or its services. Thus i can not submit passive checks as host and services are unknown.


You have perfectly described the intended behavior of the director and this cannot be changed.