This will actually pertain to the service object rather than the endpoint or zone.
If you’re using the defaults still, in services.conf you’ll see this:
apply Service "swap" {
import "generic-service"
check_command = "swap"
assign where host.name == NodeName
}
We want to modify this:
apply Service "swap" {
import "generic-service"
check_command = "swap"
command_endpoint = host.vars.client_endpoint
assign where host.vars.os == "Linux"
}
Check commands will run on the monitoring server itself (a master or a satellite) instead of the endpoint unless you explicity tell it to use the endpoint. host.vars.client_endpoint is a common convention, and if you look at the default templates.conf, you’ll see it defined as the node name for that host, as well as Linux being the defined OS. So in this case, we would be saying any host defined to be running Linux that has an endpoint object should run its own swap check.