Global ping check on masters and all satellites

hi all

i am try to configure a service for all zones. problem is service will be executed from master and not from satellite. i dont want to create a service for every satellite. is there a way to tell icinga that all services which applies to a host should be run on that endpoint where assinged to host?

For example, check_hostalive will be working and executed by endpoint but the servivces on an host will be still executed from master.

zones.d/director-global/service_apply.conf
apply Service “ping4” {
check_command = “ping4”
max_check_attempts = “3”
check_interval = 1m
retry_interval = 30s
check_timeout = 30s
enable_notifications = true
enable_active_checks = true
enable_passive_checks = true
enable_event_handler = false
enable_flapping = false
enable_perfdata = true
assign where host.address

import DirectorOverrideTemplate

}
the configuration for sat looks:
object Host “sat1” {
address = “192.168.70.99”
check_command = “hostalive”
max_check_attempts = “5”
check_interval = 1m
retry_interval = 30s
check_timeout = 15s
enable_notifications = true
enable_active_checks = true
enable_passive_checks = true
enable_event_handler = false
enable_flapping = true
enable_perfdata = true
command_endpoint = “sat1”
}

any idea how can i solve this?
It does not make sense to define the same services multiple times, so i want to apply service sets or service apply rules to hosts and when host is executed by master then services should be executed the same way.

edit:
seems i have to specify parameter command_endpoint
https://github.com/Icinga/icingaweb2-module-director/issues/808
but with director i only can set command_endpoint = host_name what i need is to specify a custom var.

cheers

I don’t quite understand what you mean by that.

When using the command_endpoint attribute it has to be set to the name of the endpoint object, that should execute the check. And best practice is, that the endpoint name is the host name.

yes but i have some servers at remote side an domain controller, samba etc, and i want to check them by the sat1 so i have to specify the sat1 at director and then in background the director create a config like:

host server1 {
address 192.168.111.111
command_endpoint = sat1
}
host sat1
{
address 192.168.111.11
command_endpoint = host_name
}

If you want a host to be check by the master and the satellite you will have to create two separate hosts/host templates.
One with the the cluster zone set to the satellite zone and one without any settings

default all system was checked by master.
but i want to check all hosts on 2nd location by the sat1

Create a new template in the Icinga Director for you second location.
Inside that template set the option “Cluster Zone” to the zone name of the second location.

After this just have all hosts from this location import the template and they will be checked by the satellite.