Page 2 of 2
Re: Return Code 255 Out of Bounds from Nagios but not CMD li
Posted: Mon Sep 08, 2014 12:21 pm
by lmiltchev
@brayshawuk
Can you run the command successfully from the CLI as nagios user?
Code: Select all
su - nagios -c '/usr/local/nagios/libexec/check_nrpe -H <remote_ip> -p 5666 -c check_xvda1'
Re: Return Code 255 Out of Bounds from Nagios but not CMD li
Posted: Mon Sep 08, 2014 1:24 pm
by brayshawuk
brayshawuk wrote:Thanks for quick response, however:
nagios@server:/usr/local/nagios/libexec$ ./check_nrpe -H <remote_ip> -p 5666 -c check_xvda1
DISK OK - free space: / 27129 MB (36% inode=10%);| /=46359MB;68940;72770;0;76601

yup
for info, I followed the same procedure to install nrpe on another remote system, added the same adv service using nconf - no issues
tomorrow I will turn up debugging and re-run the setup commands on this remote server
Re: Return Code 255 Out of Bounds from Nagios but not CMD li
Posted: Mon Sep 08, 2014 1:30 pm
by eloyd
The specific command that @lmiltchev requested you test was:
Code: Select all
su - nagios -c '/usr/local/nagios/libexec/check_nrpe -H <remote_ip> -p 5666 -c check_xvda1'
Have you tested this
specific command in its entirety, including the "su - nagios" part and the quotes?
Re: Return Code 255 Out of Bounds from Nagios but not CMD li
Posted: Mon Sep 08, 2014 4:39 pm
by lmiltchev
brayshawuk, can you also run the following command and show us the output?
Re: Return Code 255 Out of Bounds from Nagios but not CMD li
Posted: Tue Sep 09, 2014 2:34 am
by brayshawuk
su - nagios -c '/usr/local/nagios/libexec/check_nrpe -H <remote_ip> -p 5666 -c check_xvda1'
DISK OK - free space: / 27176 MB (36% inode=10%);| /=46312MB;68940;72770;0;76601
Ok - so I've been able to resolve this issue
here's how, but not sure which part resolved it
re-installed nrpe on the remote system, and setup my command aliases
verified all settings against working server - nothing different
recreated the host in nconf - exactly the same information (screenshot vs web config) - nothing different, they are identical!
generated config files and scheduled next check
- and it worked
will see how I get on once it's checked a few times, thanks for all your help - much appreciated
Re: Return Code 255 Out of Bounds from Nagios but not CMD li
Posted: Tue Sep 09, 2014 8:08 am
by eloyd
I'm willing to bet that this solved it:
re-installed nrpe on the remote system
Re: Return Code 255 Out of Bounds from Nagios but not CMD li
Posted: Tue Sep 09, 2014 9:47 am
by tmcdonald
We'll keep this thread open for a few days in case you run into problems.
Re: Return Code 255 Out of Bounds from Nagios but not CMD li
Posted: Wed Feb 21, 2018 1:46 pm
by daave
In case this helps anyone else who lands here...
I was scratching my head on this one. I had a case similar to the OP, but a little different. Everything seemed to be in place, but I was getting the "Return Code 255 Out of Bounds" error in Nagios even though everything worked okay if I ran from command line.
My XML file looked something like this:
Code: Select all
<TopLevel>
[Other stuff here]
<Success>true</Success>
</topLevel>
I was testing for Success==true, and my command line looked like this:
Code: Select all
define command {
command_name web_diag_status
command_line $USER1$/check_http_xpath.pl -S -k -H $HOSTADDRESS$ -u /Path/To/Web/Status -c '/Status/Success==true'
}
...but no go.
What I eventually figured out was that I was wanting
to test for the STRING true, not the BOOLEAN. I updated my command to
add double quotes around "true" like so:
Code: Select all
define command {
command_name web_diag_status
command_line $USER1$/check_http_xpath.pl -S -k -H $HOSTADDRESS$ -u /Path/To/Web/Status -c '/Status/Success=="true"'
}
...and then it worked OK.
Re: Return Code 255 Out of Bounds from Nagios but not CMD li
Posted: Wed Feb 21, 2018 3:07 pm
by tmcdonald
Thanks for the post, but this topic is over 3 years old at this point so I will be locking it up.