Hi All,
I came across an unexpected behaviour when working with the load-Service, and I adapted the cload/wload parameters.
Btw. Version is: icinga2-bin-2.11.3-1.el7.icinga.x86_64
-
conf.d/services.conf - unmodified
-
the host definition is:
cat zones.d/master/host1.anydomain.com.conf
object Host "host1.anydomain.com" { import "small-host" address = "192.168.202.82" address6 = "fd24:1993:399:13::20B4" vars.customer = "MYCUST1" vars.bonds = "bond0" vars.IPenabled = true vars.notification.mail.groups = [ "icingaadmins" ] check_command ="hostalive" vars.client_endpoint = name } object Endpoint "host1.anydomain.com" { host = "host1.anydomain.com" } object Zone "host1.anydomain.com" { endpoints = [ "host1.anydomain.com" ] parent = MasterZone }
using the following templates:
# cat zones.d/global-templates/templates.conf
template Host "MY-host" {
import "generic-host"
vars.client_endpoint = name
vars += {
os = "Linux"
MY = true
noswap = true
notification["mail"] = {
groups = [ "icingaadmins" ]
users = [ "icingaadmin" ]
}
disks["disk /"] = { disk_partitions = "/" }
disks["disk /boot"] = { disk_partitions = "/boot" }
disks["disk /opt"] = { disk_partitions = "/opt" }
ipmi_address = "localhost"
ipmi_protocal_lan_version = "OPENIPMI"
ipmi_config_file = "/etc/icinga2/conf.d/ipmi.cfg"
ipmi_sensor_type = "Temperature,Voltage,Fan,Power_Supply"
load_wload1 = 7.0
load_wload5 = 6.0
load_wload15 = 4.0
load_cload1 = 15.0
load_cload5 = 8.0
load_cload15 = 6.0
load_percpu = "true"
}
}
template Host "small-host" {
import "MY-host"
vars += {
laitype = "small"
procs_warning = 1000
procs_critical = 2000
}
}
- /usr/share/icinga2/include/command-plugins.conf - unchanged
As I understand then override/precedence sequence is: Service -> Host -> CheckCommand. So my setting in the host definition of cload/wload (via the templates) will override the definition in CheckCommand.
But, in icingaweb2 I have a kind of flipping in soft-states.
One minute the values from CheckCommand definition are shown, service goes red, and the next minute the correct values of the Host definition are shown, service goes green.
Questions are:
Am I doing something completely wrong? I’m sure it worked some time before…
Is the problem related to Icinga2-Core or to Iciningaweb2 ?
Any help appreciated.
Kind regards
Marcus