Package: nagios-nrpe-plugin
Version: 2.8.1-1
Severity: wishlist
Tags: patch

Hi,

While check_nrpe has a "-u" option to return STATE_UNKNOWN (instead of
STATE_CRIT) when a socket timeout occurs, it sometimes still returns
STATE_CRIT, when there are errors in opening the connection in
my_connect().

As we don't know anything about the result of the checks if the host cannot
be reached, I think it's better to return STATE_UNKNOWN instead of
STATE_CRITITCAL.

Another option would be to return timeout_return_code (thus honoring
-u).

Cheers,
MB

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (920, 'stable'), (900, 'stable'), (500, 'MB'), (400, 'testing'), 
(200, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.22.6
Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15)
Only in .: Makefile
Only in .: check_nrpe
Only in .: nrpe
diff -ru /home/bus/X/nagios-nrpe-2.8.1/src/utils.c ./utils.c
--- /home/bus/X/nagios-nrpe-2.8.1/src/utils.c   2007-10-09 15:55:08.000000000 
+0200
+++ ./utils.c   2007-10-09 15:54:42.000000000 +0200
@@ -160,10 +160,10 @@
                        printf("Network is unreachable\n");
                        break;
                default:
-                       printf("Connection refused or timed out\n");
+                       printf("Connection refused or timed out (%s)\n", 
strerror(errno));
                        }
 
-               return STATE_CRITICAL;
+               return STATE_UNKNOWN;
                }
 
        return STATE_OK;

Reply via email to