Hi,
I would like to know if it’s possible to create a service who when the status change from OK to anything else than OK, will not go back to OK whatever the next check result. And need a manual change (through the webui for example).
Regards
Hi,
I would like to know if it’s possible to create a service who when the status change from OK to anything else than OK, will not go back to OK whatever the next check result. And need a manual change (through the webui for example).
Regards
Hi,
Icinga process only the return code and performance data from a script or a binary which the CheckCommand is calling. (look here https://icinga.com/docs/icinga-2/latest/doc/03-monitoring-basics/#check-result-state-mapping. )
So that means for you:
To set the service check result in icinga to ok, you have to define the service with the option
enable_active_checks = true
enable_passive_checks = true
or in the director:
Thanks…
No sure I understand. So if it’s not I return 2 and critical. But otherwise I return what ? 3 and ‘empty’ ?
Regards
Here is an small example what we use for some test servers with a http check. The colleague responsible would only like to receive warnings on certain servers, even if the check is critical. So I chance the return code in this case from critical (2) to warning (1)
#/bin/bash
/usr/lib64/nagios/plugins/check_http $*
RESULT="$?"
if [ "$RESULT" = "2" ]; then
exit 1;
else
exit $RESULT
fi