Page 4 of 4

Re: NRPE:Unable to read output

Posted: Thu Jul 24, 2014 12:44 pm
by snapon_admin
Found a really strange development. This is on my prod server, which I haven't changed anything on yet. All of the modifications in this thread have been in test. But I just happened to notice that I'm getting an "NRPE: Unable to read output" error on one of our service checks, but it shows up as unknown. So I ran 2 commands from the command line, one that is similar to the zone CPU check, and one that is using check_disk. Both come back with different exit codes.

Code: Select all

[root@nagiosXI1 tmp]# /usr/local/nagios/libexec/check_nrpe -p 5668 -H INCORRECTGLOBAL.snapon.com -c check_zone_cpu -a '-n ZONE -w 80 -c 90'
NRPE: Unable to read output
You have new mail in /var/spool/mail/root
[root@nagiosXI1 tmp]# echo $?
1
[root@nagiosXI1 tmp]# /usr/local/nagios/libexec/check_nrpe -p 5668 -H SERVER.snapon.com -c check_disk -a '-w 20% -c 10% -p /'
NRPE: Unable to read output
[root@nagiosXI1 tmp]# echo $?
3

Re: NRPE:Unable to read output

Posted: Thu Jul 24, 2014 2:24 pm
by abrist
Alright. Lets run these checks without nrpe on their local boxes. Check the exit code after running each check locally.

Re: NRPE:Unable to read output

Posted: Thu Jul 24, 2014 2:55 pm
by snapon_admin
Running the check_zone_cpu plugin on the wrong global (the same wrong global I was using with nrpe) gives me this:

Code: Select all

<GLOBAL>$ ./check_zone_cpu.sh -n <ZONE> -w 80 - c 90
Unknown argument: -
./check_zone_cpu.sh: print_usage: execute permission denied
</>
<GLOBAL>$ echo $?
3
</>
<GLOBAL>$
Check_disk on that zone makes even less sense:

Code: Select all

<ZONE>$ ./check_disk -w 20% -c 10% -p /
ld.so.1: check_disk: fatal: libintl.so.8: open failed: No such file or directory
Killed
</>
<ZONE>$ echo $?
137

Re: NRPE:Unable to read output

Posted: Thu Jul 24, 2014 3:18 pm
by snapon_admin
Ok, so it looks like the disk check plugin on that zone is an older version of the plugin and isn't configured properly, so that's why the error it's reporting doesn't make any sense.

Re: NRPE:Unable to read output

Posted: Thu Jul 24, 2014 4:21 pm
by abrist
Ahh, so does the state changes to the source work as expected?