Make NRPE checks exit with UNKNOWN instead of CRITICAL in a case of timeout

Version

This article was written for version 6.0, it could work on both lower and higher version if nothing else is stated.

Many times, nrpe checks time out due to several reasons. In my opinion, it's nonsense to return a "CRITICAL" in such a situation and trigger a notification, when usually notifications should be triggered at CRITICAL and WARNINGs. I personally have that problem with my personal OP5 Monitor installation quite often.

The solution: change all your check_nrpe* check_commands to use the argument "-u" additionally to the existing ones:

 -u         = Make socket timeouts return an UNKNOWN state instead of CRITICAL