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.
Problems Pluggin check_oracle_tbs
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Problems Pluggin check_oracle_tbs
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
When commands are executed they do not have a full session created, and just utilize the info in the .bashrc
Re: Problems Pluggin check_oracle_tbs
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
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
Re: Problems Pluggin check_oracle_tbs
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.
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.
Re: Problems Pluggin check_oracle_tbs
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.
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
Nagios does not load in .profile at all.
I am glad you got it working.
I am glad you got it working.