I am moving from SSH based checks to distributed setup. Icinga 2.11.3 on all nodes.
I have problem with overriding procs service threshold variable values with host variable values.
In this scenario I have a single master node and one client master monitors (I call it server.domain.tld in this example).
Configuration:
zones.d/master/services.conf
apply Service "procs" {
import "generic-service"
check_command = "procs"
command_endpoint = host.vars.agent_endpoint
check_interval = 10m
vars.procs_warning = 333
vars.procs_critical = 444
assign where ( host.zone == "master" && host.vars.agent_endpoint ) && host.vars.hosttype != "remote"
}
zones.d/master/hosts/server.domain.tld
object Host "server.domain.tld" {
import "generic-host"
address = "server.IP.v.4"
vars.procs_warning = 555
vars.procs_critical = 666
vars.agent_endpoint = name
}
zones.d/master/clients.conf
object Endpoint "server.domain.tld" {
host = "server.IP.v.4"
log_duration = 0
}
object Zone "server.domain.tld" {
endpoints = [ "server.domain.tld" ]
parent = "master"
}
Which values should be used for the check?
In my case check is assigned to server.domain.tld with vars.procs_warning = 333 and vars.procs_critical = 444 ignoring the variables (555,666) in the host object. Is this expected behavior? Am I doing something wrong?