Behavior with empty command_endpoint attribute

Hi folks,

there is a behavior in icinga2 which I basically do not understand.

If the command_endpoint attribute for a service object is not set, the checks just run on the master?

I would expect that either a config error is thrown or at least by default command_endpoint is set to the hostname of the host object.

What is the background for this behavior?

By default, the parent node will run the checks. This is because your standard toolset is things like ping, http, ssh, etc. Similarly, a lot of host objects aren’t going to be running the icinga agent/have endpoint objects, so there would be nothing to define.

If the check should run on the local instance, this could be a satellite as well which e.g. invokes check_ping or check_http. command_endpoint is just a simplified execution method throughout the cluster, compared to a full blown satellite instance with its own scheduler, config sync, etc.

Since command_endpoint as mode is just one inside the cluster, having this not specified is not necessarily an error. Indeed, you as the admin are required to verify the executed check result and its check source then.

Check the documentation for the different roles and methods to build a distributed environment.