Page 3 of 5

Re: (Return code of 127 is out of bounds - plugin may be mis

Posted: Fri Nov 15, 2019 1:13 pm
by kmartin2007
Could it be trying to run the check_http command?


this config file is from the old server that is attached here.

Output from old server

[root@DALSRVITMON01 libexec]# ./check_http -I ESPDATA.ORG.AU
HTTP OK: HTTP/1.1 301 Moved Permanently - 434 bytes in 0.527 second response time |time=0.526625s;;;0.000000 size=434B;;;0
[root@DALSRVITMON01 libexec]#


output from new server


root@dalsrvitmon03:/usr/local/nagios/libexec# ./check_http -I ESPDATA.ORG.AU
./check_http: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory

Re: (Return code of 127 is out of bounds - plugin may be mis

Posted: Fri Nov 15, 2019 1:15 pm
by scottwilkerson
kmartin2007 wrote:(not sure if im running this correctly)
root@dalsrvitmon03:/usr/local/nagios/libexec# ./check_url.pl -B ESPDATA.ORG.AU
rm: cannot remove 'tmp_html': No such file or directory
UNKNOWN:
First you are going to need to understand the plugin as it is returning an error. We are not the author of the plugin so I can't assist much there.
kmartin2007 wrote:root@dalsrvitmon03:/usr/local/nagios/libexec# ./check_http -I ESPDATA.ORG.AU
./check_http: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory
this is different all together, but that error usually happens when you copy the plugins between servers with different architectures...
Here is a guide on installing the nagios-plugins package from source
https://support.nagios.com/kb/article/n ... e-569.html

Re: (Return code of 127 is out of bounds - plugin may be mis

Posted: Fri Nov 15, 2019 1:18 pm
by kmartin2007
I installed them from packages from ubuntu. using apt install

Re: (Return code of 127 is out of bounds - plugin may be mis

Posted: Fri Nov 15, 2019 1:21 pm
by kmartin2007
Are you saying i should just download and them them overwrite what is there and see if it works?

Re: (Return code of 127 is out of bounds - plugin may be mis

Posted: Fri Nov 15, 2019 1:24 pm
by scottwilkerson
kmartin2007 wrote:I installed them from packages from ubuntu. using apt install
Back in 2018? Why are the permissions as they are if so?

Code: Select all

-rwxrwxrwx 1 root root 101904 Feb 6 2018 check_http
kmartin2007 wrote:Are you saying i should just download and them them overwrite what is there and see if it works?
I would strongly recommend this, even though this is outside of your check_url.pl problem

Re: (Return code of 127 is out of bounds - plugin may be mis

Posted: Fri Nov 15, 2019 1:33 pm
by kmartin2007
Done,

I can now run the check_http from the new server with no issues.


root@dalsrvitmon03:/usr/local/nagios/libexec# ./check_http -I ESPDATA.ORG.AU
HTTP OK: HTTP/1.1 301 Moved Permanently - 434 bytes in 0.487 second response time |time=0.486768s;;;0.000000 size=434B;;;0


check_url.pl now running

root@dalsrvitmon03:/usr/local/nagios/libexec# ./check_url.pl https://www.vihsp.espdata.org.au/
OK: 200 OK

Re: (Return code of 127 is out of bounds - plugin may be mis

Posted: Fri Nov 15, 2019 1:36 pm
by scottwilkerson
kmartin2007 wrote:check_url.pl now running

root@dalsrvitmon03:/usr/local/nagios/libexec# ./check_url.pl https://www.vihsp.espdata.org.au/
OK: 200 OK
Ok great, if that is how the command is supposed to be run, then you should change the command to

Code: Select all

define command {

command_name check_url
command_line $USER1$/check_url.pl $ARG1$
}
then restart nagios

Re: (Return code of 127 is out of bounds - plugin may be mis

Posted: Fri Nov 15, 2019 1:40 pm
by kmartin2007
scottwilkerson wrote:
kmartin2007 wrote:check_url.pl now running

root@dalsrvitmon03:/usr/local/nagios/libexec# ./check_url.pl https://www.vihsp.espdata.org.au/
OK: 200 OK
Ok great, if that is how the command is supposed to be run, then you should change the command to

Code: Select all

define command {

command_name check_url
command_line $USER1$/check_url.pl $ARG1$
}
then restart nagios


define command {

command_name check_url
command_line $USER1$/check_url.pl $ARG1$
}


(different site, but this is how they all are configured.) from services.cfg do these need to be changed?
define service{
use production-service
host_name DALSRVPRDIIS08
service_description DCNBS.COM
check_command check_url!http://www.DCNBS.com/index.asp
}

Re: (Return code of 127 is out of bounds - plugin may be mis

Posted: Fri Nov 15, 2019 1:43 pm
by kmartin2007
after changing the command, there is still no difference. get the (Return code of -1 is out of bounds) error

ESPDATA.ORG.AU
Perform Extra Service Actions
CRITICAL 2019-11-15 18:42:42 2d 21h 40m 0s 2/2 (Return code of -1 is out of bounds)


root@dalsrvitmon03:/usr/local/nagios/libexec# date
Fri Nov 15 18:43:02 UTC 2019

Re: (Return code of 127 is out of bounds - plugin may be mis

Posted: Fri Nov 15, 2019 1:47 pm
by scottwilkerson
kmartin2007 wrote:CRITICAL 2019-11-15 18:42:42 2d 21h 40m 0s 2/2 (Return code of -1 is out of bounds)
This is different that what you were getting before
Return code of 127 is out of bounds - plugin may be missing
Please post the config for the service giving

Code: Select all

Return code of -1 is out of bounds