Page 1 of 1

check_oracle_health

Posted: Fri Aug 21, 2015 7:51 am
by dhineshkumar
Hi,
I am trying to monitor oracle using check_oracle_health plugin. I have installed DBD::Oracle modules and oracle client.
I am able to run the script as sudo. But as Nagios user I'm getting the below error.

CRITICAL - cannot connect to xyxy. install_driver(Oracle) failed: Can't locate loadable object for module DBD::Oracle in @INC (@INC contains: /nagiosfs/libexec /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 14) line 3
Compilation failed in require at (eval 14) line 3.
Perhaps a module that DBD::Oracle requires hasn't been fully installed
at /nagiosfs/libexec/check_oracle_health line 4755

But I'm getting the output while running the plugin as root user. Even I tried setting all the perl modules and Oracle file permission to 777, but no luck.

Re: check_oracle_health

Posted: Fri Aug 21, 2015 12:19 pm
by jolson
I found an older thread with a similar issue: https://support.nagios.com/forum/viewto ... 34&p=31927

You said that if you use 'sudo' as the nagios user, everything works properly. Is that correct?

You might try exporting a few paths as the 'nagios' user:

Code: Select all

export ORACLE_HOME=<path to your Oracle which was given by the script>
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
cpan -i DBD::Oracle
After doing so, is the nagios user able to initiate your check oracle command properly?

Re: check_oracle_health

Posted: Fri Aug 21, 2015 11:46 pm
by dhineshkumar
Thanks, I'm able to see the output, after exporting the Oracle paths.

Re: check_oracle_health

Posted: Sun Aug 23, 2015 7:01 pm
by tmcdonald
Are we all set to close this thread?

Re: check_oracle_health

Posted: Sat Aug 29, 2015 2:14 pm
by dhineshkumar
Yes.. We can close this thread.

Apologies for late reply.