NRPE:Unable to read output

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: NRPE:Unable to read output

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NRPE:Unable to read output

Post by abrist »

Alright. Lets run these checks without nrpe on their local boxes. Check the exit code after running each check locally.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: NRPE:Unable to read output

Post 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
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: NRPE:Unable to read output

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NRPE:Unable to read output

Post by abrist »

Ahh, so does the state changes to the source work as expected?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked