@steaksauce Thank you very much for the welcome
I am happy for your prompt reaction to this thread. (maybe the problem is between the chair and the keyboard, but i want to make sure).
Now let`s explain in more detail.
Maybe it is worth mentioning that we are running pretty old Icinga version and we should upgrade ASAP of course. (we are well aware of that) And yes Director sounds good too.
We are running Icinga server Version 2.4.2
We are monitoring around 15 000 linux servers running host checks and around 800 000 applied service checks on all linux servers. We are using NRPE agent and Icinga distributed checks. That all is running fine for several years.
But here i am having problem to force icinga to execute the check only from the source endpoint object of my choice defined on the master in the master zones.conf.
Obviously the service checks do work from the master server, but this is exactly what i want to avoid.
I want the check to be executed from a particular endpoint object defined in the zones.conf, taking away the load from the master server and utilize the unused resources of the satellites or the clients, that is the goal.
So i did as you proposed. I moved the service.conf back to the master.
It looks like i must be missing something.
See my setup below.
Here is the zones.conf of the master01fqdn server
/etc/icinga2/zones.conf
########################################
// Endpoints
object Endpoint “master01fqdn” {
host = “master01fqdn”
}
object Endpoint “satellite01fqdn” {
host = “satellite01fqdn”
}
object Endpoint “client01fqdn” {
host = “client01fqdn”
log_duration = 0
}
object Endpoint “client02fqdn” {
host = “client02fqdn”
log_duration = 0
}
// Zones
object Zone “master01” {
endpoints = [ “master01fqdn” ]
}
object Zone “satellite01” {
endpoints = [ “satellite01fqdn” ]
parent = “master01”
}
object Zone “satellite01-client” {
endpoints = [ “client01fqdn”, “client02fqdn” ]
parent = “satellite01”
}
// Global settings
object Zone “global-templates” {
global = true
}
#################################################
Here is host object definition located on the master server in
/etc/icinga2//zones.d/master01/hosts.conf
object Host “someserver01fqdn”{
display_name = “someserver01fqdn”
address = “someserver01fqdn”
check_command = “ping4”
vars.domain = “com”
vars.slevel = “production”
vars.status = “production”
groups = [ “slevel_production”, “status_production”, ]
vars.client_endpoint = “satellite01fqdn”
zone = “satellite01”
}
#####################################################
here is the apply service check definition located on the master in
/etc/icinga2//zones.d/master01/services.conf
template Service “service_template_TEST_SERVICE”{
import “generic-ec-service”
check_command = “TEST_COMMAND”
enable_notifications = false
max_check_attempts = 9
check_interval = 5m
retry_interval = 2m
enable_perfdata = false
}
apply Service “TEST_SERVICE” {
import “service_template_TEST_SERVICE”
command_endpoint = host.vars.client_endpoint
assign where host.address && host.zone == “satellite01” && host.command_endpoint == host.vars.client_endpoint && “TEST_hostgroup” in host.groups
}
I did not post the hostgroup config, but the someserver01fqdn is matching it and is a member of that hosgroup.
The actual error i am getting is, terminated with exit code 128, output: execvpe
No such file or directory
Which is obvious as far the script is not present on the master server by purpose, as i do not want the master to execute it, but eighter the satellite or balance it between clients in the satellite zone.
I hope i this explains the challenge i am trying to solve.
best regards
Peter