I am migrating over to use the native icinga2 agent (from nrpe), but there is one trick i have not been able to replicate. In nrpe I would configure the following command on the agent.
command[check_apt]=/usr/lib/nagios/plugins/check_apt || true
this forced the check to always have return code 0, meaning i get the check results but it never goes crit or warn (and without having to have it in downtime/ack’ed)
I tried setting up a parameters in the CheckCommand object
“–no-alert” = { set_if = “$check_apt_no_alert$”
key = “|| true”
order = 99
}
but this does not produce the desired behaviour.
If there any way to do this using the icinga2 agent and check commands?
or do I have to modify the actual check script?
Thanks