Question is old, but:
You will need to define the remote client (command_endpoint) in some way, otherwise it will only check on the master. I assume your agent configuration is running, so you have already configured the zones.conf
. I suggest adding a second service for the remote clients:
apply Service "apt2" {
import "generic-service"
check_interval = 10m // * how often to check
check_command = "apt" // * call the plugin
command_endpoint = host.vars.remote_client // * execute the plugin on the remote machine
//vars.apt_only_critical = "1" //uncomment if you want.
assign where host.vars.remote_client && host.vars.linux_apt == "1" // * only check where remote client is set and vars.linux_apt is set to "1"
}
Host configuration:
object Host "<HostName>" {
import "generic-host" // * default stuff
address = "<HostAddress>" // * default stuff
vars.linux_apt = "1" // * Set this host to be checked by the new service
vars.remote_client = "<HostNameAsConfiguredInZones.conf>" // * Needed for the remote service checks. Check `zones.conf` on what to insert here for your host.
}