Page 1 of 1

(Return code of 127 is out of bounds - plugin may be missing

Posted: Thu Aug 30, 2012 4:08 pm
by bpandey
After installing the "Oracle Serverspace" & "Oracle Tablespace" monitoring wizard we are getting error "(Return code of 127 is out of bounds - plugin may be missing". I checked under the /usr/local/nagios/libexec dir and I see only one script named : check_oracle. I have a service called "Tablespace Fee space", which has the following syntax:

check_xi_oracletablespace!--connect "ip-address:1521" --username system --password "*********" --name databasename --mode tablespace-free --warning 5: --critical 2:

Nagios and Oracle server details:

Nagios XI Server : VM Player Image with Centos - 64 Bit
Oracle Host : Solaris 10 64-Bit

any help would be appriciated.

Thanks

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

Posted: Fri Aug 31, 2012 8:49 am
by scottwilkerson
We have a document outlining the setup of check_oracle_health

http://assets.nagios.com/downloads/nagi ... lation.pdf

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

Posted: Wed Sep 05, 2012 2:04 pm
by bpandey
scottwilkerson,

I did follow the steps from the document you had provided but I am still getting the following error:

CRITICAL - cannot connect to hostname:1521. install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libocci.so.11.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/

Here is my env configuration
-----------------------------------
uname -i
x86_64

[root@hosts]# echo $ORACLE_HOME
/usr/lib/oracle/11.2/client64

[root@hosts]# echo $LD_LIBRARY_PATH
/usr/lib/oracle/11.2/client64/lib
[root@hosts]#

[root@hosts]# cpan -i DBD::Oracle
CPAN: Storable loaded ok (v2.20)
Going to read '/root/.cpan/Metadata'
Database was generated on Wed, 05 Sep 2012 18:23:03 GMT
DBD::Oracle is up to date (1.50).
[root@hosts]#

Command Edit from Core Config Manager

Command : check_xi_oracleserverspace
Command line* : /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 $USER1$/check_oracle_health $ARG1$


Note : I noticed that I had a /usr/lib64 and /usr/lib, but the oracle client was installed in /usr/lib/oracle/11.2/client64 and it also has lib dir the client64 dir. So I am not sure if that will cause any issues. I copied the entire oracle dir from /usr/lib to /usr/lib64 and adjusted ORACLE_HOME & LD_LIBRARY_PATH and command line but still not progress.
-----------------------------

Your help is appreciated.

Thanks

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

Posted: Wed Sep 05, 2012 3:20 pm
by slansing
Have you made sure that the correct environment variables are set? And that the proper path is being supplied?:

Code: Select all

/usr/lib/oracle/<YOUR ORACLE VERSION>/client
--OR--

Code: Select all

/usr/lib64/oracle/<YOUR ORACLE VERSION>/client

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

Posted: Thu Sep 06, 2012 8:36 am
by bpandey
When I ran the oracleinstall.sh, it created the following ORACLE_HOME:

/usr/lib/oracle/11.2/client64/

but I also copied the entire /usr/lib/oracle to /usr/lib4/oracle and adjusted the command line and still the same.

Thanks

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

Posted: Fri Sep 07, 2012 10:14 am
by yancy
bpandey,

Can you post the current command definition (page three of the install doc *command line)

Also, what are the file permissions of the files and folder to which the command definition is pointing?

Regards,

-Yancy

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

Posted: Tue Sep 11, 2012 6:31 am
by bpandey
Hi Yancy,

Here is the information you had requested:

Command Name : check_xi_oracleserverspace
-----------------------------------------
Command* : check_xi_oracleserverspace
Command line* : /usr/bin/env LD_LIBRARY_PATH=/usr/lib64/oracle/11.2/client/lib ORACLE_HOME=/usr/lib64/oracle/11.2/client $USER1$/check_oracle_health $ARG1$
Command Type : check command


Command Name : check_xi_oracletablespace
----------------------------------------
Command* : check_xi_oracletablespace
Command line* : /usr/bin/env LD_LIBRARY_PATH=/usr/lib64/oracle/11.2/client/lib ORACLE_HOME=/usr/lib64/oracle/11.2/client $USER1$/check_oracle_health $ARG1$
Command type : Check Command


Note : I also changed to ORACLE_HOME=/usr/lib/oracle/11.2/client64 and LD_LIBRARY_PATH=$ORACLE_HOME/lib but still the same error.

Thanks

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

Posted: Wed Sep 12, 2012 10:07 am
by scottwilkerson
Can you run the following and post the results

Code: Select all

locate libocci.so.11.1

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

Posted: Mon Sep 17, 2012 7:13 am
by bpandey
[root@ ~]# locate libocci.so.11.1
/usr/lib/oracle/11.2/client64/lib/libocci.so.11.1
/usr/lib64/oracle/11.2/client/lib/libocci.so.11.1
[root@ ~]#


Thanks

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

Posted: Mon Sep 17, 2012 10:21 am
by scottwilkerson
Lets make sure this isn't a permissions problem, please run

Code: Select all

ls -l /usr/lib/oracle/11.2/client64/lib/libocci.so.11.1
ls -l /usr/lib64/oracle/11.2/client/lib/libocci.so.11.1