check_oracle_health

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
dhineshkumar
Posts: 22
Joined: Wed Jul 22, 2015 8:32 am

check_oracle_health

Post 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.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: check_oracle_health

Post 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?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
dhineshkumar
Posts: 22
Joined: Wed Jul 22, 2015 8:32 am

Re: check_oracle_health

Post by dhineshkumar »

Thanks, I'm able to see the output, after exporting the Oracle paths.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_oracle_health

Post by tmcdonald »

Are we all set to close this thread?
Former Nagios employee
dhineshkumar
Posts: 22
Joined: Wed Jul 22, 2015 8:32 am

Re: check_oracle_health

Post by dhineshkumar »

Yes.. We can close this thread.

Apologies for late reply.
Locked