I would like to apply a multiple to the thresholds for service procs
if a Host
belongs to Hostgroup "big"
. I’ve tried the following code, however this will set vars.procs_warning
to 0 instead of 500 (i.e. twice the default value) as I had initially expected.
Is vars.procs_warning
not yet set to the default when this code is run? (Is it perhaps only implemented at the level of the underlying script, and Icinga 2 does not know about it at all?) Or can I refer to the default value by some other means (except its literal value)?
apply Service "procs" {{
# ...
check_command = "procs"
if ("big" in host.groups) {{
vars.procs_warning = 2 * vars.procs.warning
}}