Problems Pluggin check_oracle_tbs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
msanbrug
Posts: 58
Joined: Fri Nov 04, 2011 7:40 am

Re: Problems Pluggin check_oracle_tbs

Post by msanbrug »

Hello,

In my before post, I don't indicanting, that in Nagios, the output is "(No output!", but I eceuted in command line is correctly.

Regards.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems Pluggin check_oracle_tbs

Post by scottwilkerson »

there must be some needed variable that are in the .profile that are not in the .bashrc file for the Nagios user.

When commands are executed they do not have a full session created, and just utilize the info in the .bashrc
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
msanbrug
Posts: 58
Joined: Fri Nov 04, 2011 7:40 am

Re: Problems Pluggin check_oracle_tbs

Post by msanbrug »

Hello,

I added all entries in .bashrc, but nagios cant't executed script: (No output!)

The entries I added in .bashrc:

# .bashrc

# User specific aliases and functions

export ORACLE_HOME=/home/oracle/client10.2.0
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.5/client/lib:/home/oracle/client10.2.0/lib
export PATH=$PATH:$ORACLE_HOME/bin:$LD_LIBRARY_PATH:$TNS_ADMIN

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi


I don't know, I can look more. In check_oracle_tbs, I added also this:

$ENV{TNS_ADMIN} = '/usr/local/instantclient_10_2';
$ENV{TNS_ADMIN} = '/home/oracle/client10.2.0/network/admin';
$ENV{LD_LIBRARY_PATH} = '/usr/lib/oracle/10.2.0.5/client/lib:/home/oracle/client10.2.0/lib';

But the result is always the same: (No output!)

Is there any log, file, etc, that I can check to verify, because it's faling?

Regards.
Monica
msanbrug
Posts: 58
Joined: Fri Nov 04, 2011 7:40 am

Re: Problems Pluggin check_oracle_tbs

Post by msanbrug »

Hello,

I found an perl script that show me what is the error: capture_plugin.pl.

After I added comand and service, and show this error?

install_driver(Oracle) failed: Can't load '/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.



Regards.
msanbrug
Posts: 58
Joined: Fri Nov 04, 2011 7:40 am

Re: Problems Pluggin check_oracle_tbs

Post by msanbrug »

Hello,

After review environment variables in .profile and .bashrc are correctly. I created an shell script, where I put environment variables and call plugin check_oracle_tbs and now is correctly. The problem that, nagios not load correctly environment variables since .profile and .bashrc


Regards.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems Pluggin check_oracle_tbs

Post by scottwilkerson »

Nagios does not load in .profile at all.

I am glad you got it working.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked