Hi.
I have the following setup:
A "central" Icinga2 instance (let’s call it "alpha"), that all the monitored
hosts connect back to, with their own local Icinga2 installs.
On the central icinga2 instance, a host (let’s call it "bravo") is defined like
this:
template Host "generic-host" {
max_check_attempts = 3
check_interval = 5m
retry_interval = 1m
check_command = "hostalive"
}
object Host "bravo.example.com" {
import "generic-host"
address = "bravo.example.com"
vars.os = "Linux"
vars.procs_warning = 320
vars.procs_critical = 400
vars.notification["mail"] = {
groups = [ "icingaadmins" ]
}
}
And it has a service applied like this:
template Service "generic-service" {
max_check_attempts = 5
check_interval = 5m
retry_interval = 1m
}
template Service "remote-service" {
import "generic-service"
command_endpoint = host.name
}
apply Service "procs" {
import "remote-service"
check_command = "procs"
assign where (host.vars.os == "Linux" || host.vars.os == "FreeBSD")
}
The CheckCommand for procs is the ons that's in from start in
/usr/share/icinga2/include/command-plugins.conf
Abbreviated below:
object CheckCommand "procs" {
import "plugin-check-command"
// ---- snip ----
arguments = {
"-w" = {
value = "$procs_warning$"
description = "Generate warning state if metric is
outside this range"
}
"-c" = {
value = "$procs_critical$"
description = "Generate critical state if metric is
outside this range"
}
// ---- snip ----
}
vars.procs_warning = 250
vars.procs_critical = 400
}
What I'm expecting to happen, based on this documentation:
-
http://docs.icinga.org/icinga2/snapshot/doc/module/icinga2/chapter/monitoring-basics#command-passing-parameters
-
http://docs.icinga.org/icinga2/snapshot/doc/module/icinga2/chapter/monitoring-basics#macro-evaluation-order
... is that the variables "procs_warning" and "procs_critical" should override
the defaults in the CheckCommand definition.
What actually happens is that I still get spurious warnings based on the
default threshholds, for example, I have a warning if
What am I missing in my understanding of how this is supposed to work?
--
IT-assistans Sverige AB
Per von Zweigbergk
Phone: +46 (0)8 522 192 15
Mail/Lync: [email protected]
♻ This e-mail was sent using 100% recycled electrons.
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users