> On 13 Feb 2018, at 16:47, Stephane Bortzmeyer <steph...@sources.org> wrote: > > No, the thresholds were the default ones. I now define the thresholds > in the host, not in the services (ping4 and ping6) and now, > "Performance Data" show the right thersholds, and the services ping4 > and ping6 are not longer in CRITICAL state. Thanks for the tip, but I > still don't really understand what's going on.
If I define the variables in the host object for "test-target" and not in the service object, I get the proper thresholds both for the "hostalive" check of the "test-target" host and for its "ping4" service. This is puzzling, as the "ping4" service does not see the variables on the object level, while the "test-target" host does: > icinga2 object list --type host --name test-target > Object 'test-target' of type 'Host': > [...] > * vars > [...] > * ping_cpl = 35 > % = modified in '/etc/icinga2/zones.d/master/test-hosts.conf', lines > 7:5-7:22 > * ping_crta = 1050 > % = modified in '/etc/icinga2/zones.d/master/test-hosts.conf', lines > 5:5-5:25 > * ping_wpl = 20 > % = modified in '/etc/icinga2/zones.d/master/test-hosts.conf', lines > 6:5-6:22 > * ping_wrta = 750 > % = modified in '/etc/icinga2/zones.d/master/test-hosts.conf', lines > 4:5-4:24 > icinga2 object list --type service --name 'test-target!ping4' > Object 'test-target!ping4' of type 'Service': > [...] > * vars > [no ping* variables in the list] The fact that your variables were in the service object but not in the host object led me to the assumption that you should get alerts for the host, not the service, but that wasn't correct either, leading to more confusion on my end. The ping4 service obviously inherits the vars.ping* settings from the host object, as the thresholds in perfdata are the same without showing up in the service object. At the moment I cannot seem to find how this happens, though ... possibly some internal optimisation is going on, as strictly speaking the "ping" service and the "hostalive" check do pretty much the same. Maybe someone with better knowledge about the internal magic of Icinga 2 might be able to explain ... _______________________________________________ icinga-users mailing list icinga-users@lists.icinga.org https://lists.icinga.org/mailman/listinfo/icinga-users