You didn't correctly install the DBD::Oracle or your env variables are not correct, as your error message shows it:<br><br>Can't locate DBD/Oracle.pm in @INC (@INC contains:
/usr/local/nagios/libexec /etc/perl /usr/local/lib/perl/5.14.2
/usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl
.) at (eval 13) line 3. <br><br>You said that you have set the paths in .bashrc:<br><br><blockquote>I also set in .bashrc the enviroment variables:<br>
export ORACLE_HOME=/usr/lib/oracle/11.2/client<br>
export PATH=$PATH:$ORACLE_HOME/bin<br>
export LD_LIBRARY_PATH=$ORACLE_HOME/lib<br></blockquote><div>You probably set this as root. Don't forget that Nagios runs under its own user! (by default: nagios). <br><br></div><br><br><div class="gmail_quote">
On Mon, Oct 29, 2012 at 9:50 AM, Cosmin Neagu <span dir="ltr"><<a href="mailto:cosmin.neagu@omnilogic.ro" target="_blank">cosmin.neagu@omnilogic.ro</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Hi Nagios Users,<br>
Can someone help me or give a hint on why check_oracle_health does
not work (as describe below) ?<div><div class="h5"><br>
<pre cols="72"></pre>
On 10/23/2012 04:59 PM, Cosmin Neagu wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div>Hi all,<br>
<br>
I manage to install the oracle client on nagios machine after
all (google is the best) and making all the necesary setting so
that check_oracle_health is working from command line as nagios
user:<br>
<br>
nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health
--connect IGAS --username abc --password abc --mode=tnsping<br>
Use of qw(...) as parentheses is deprecated at
./check_oracle_health line 4163.<br>
Use of qw(...) as parentheses is deprecated at
./check_oracle_health line 6167.<br>
OK - connection established to IGAS.<br>
nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health
--connect IGAS --username abc --password abc
--mode=connection-time<br>
Use of qw(...) as parentheses is deprecated at
./check_oracle_health line 4163.<br>
Use of qw(...) as parentheses is deprecated at
./check_oracle_health line 6167.<br>
OK - 0.10 seconds to connect as iapc_etl |
connection_time=0.0968;1;5<br>
nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health
--connect IGAS --username abc --password abc
--mode=connected-users<br>
Use of qw(...) as parentheses is deprecated at
./check_oracle_health line 4163.<br>
Use of qw(...) as parentheses is deprecated at
./check_oracle_health line 6167.<br>
OK - 31 connected users | connected_users=31;50;100<br>
<br>
<br>
The command is defined like this:<br>
define command{<br>
command_name check_oracle_health<br>
command_line $USER1$/check_oracle_health $ARG1$<br>
}<br>
<br>
And the services:<br>
define service {<br>
use generic-service<br>
host_name DBIGASDS<br>
service_description Reachability via tnsping<br>
check_command check_oracle_health! --connect
IGAS --username abc --password abc --mode=tnsping<br>
contacts cosmin<br>
}<br>
<br>
define service {<br>
use generic-service<br>
host_name DBIGASDS<br>
service_description Connection time to DB<br>
check_command check_oracle_health!--connect
IGAS --username abc --password abc mode=connection-time<br>
contacts cosmin<br>
}<br>
define service {<br>
use generic-service<br>
host_name DBIGASDS<br>
service_description Connected users to DB<br>
check_command check_oracle_health!--connect
IGAS --username abc --password abc mode=connected-users<br>
contacts cosmin<br>
<br>
<br>
I also set in .bashrc the enviroment variables:<br>
export ORACLE_HOME=/usr/lib/oracle/11.2/client<br>
export PATH=$PATH:$ORACLE_HOME/bin<br>
export LD_LIBRARY_PATH=$ORACLE_HOME/lib<br>
<br>
<br>
But, in Nagios 3.4.1, i do not receive the corect status for
those services:<br>
For all 3 services i receive:<br>
CRITICAL - cannot connect to IGAS. install_driver(Oracle)
failed: Can't locate DBD/Oracle.pm in @INC (@INC contains:
/usr/local/nagios/libexec /etc/perl /usr/local/lib/perl/5.14.2
/usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl
.) at (eval 13) line 3. <br>
<br>
<br>
I realy don't know what to check anymore and why does it say
that, so any help would be apreciated.<br>
<br>
More info:<br>
nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health
-V<br>
check_oracle_health (1.7.3)<br>
nagios@monitor:/usr/local/nagios/etc$ uname -a<br>
Linux monitor 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27
17:25:43 UTC 2012 i686 i686 i386 GNU/Linux<br>
nagios@monitor:/usr/local/nagios/etc$ lsb_release -a<br>
No LSB modules are available.<br>
Distributor ID: Ubuntu<br>
Description: Ubuntu 12.04.1 LTS<br>
Release: 12.04<br>
Codename: precise<br>
<br>
<pre cols="72"> Cosmin Neagu
NOC Team Leader
Str. I. G. Duca nr. 36
Otopeni, Judetul Ilfov, 075100 Romania
Tel: 021 303 3159 / 0732 669 193
<a href="http://www.omnilogic.ro" target="_blank">www.omnilogic.ro</a>
</pre>
On 10/03/2012 09:34 AM, Claudio Kuenzler wrote:<br>
</div>
<blockquote type="cite">It's not that hard and a lot of things are written
in the documentation of check_oracle_health. <br>
I even wrote an article about this in September 2011 explaining
the steps:<br>
<a href="http://www.claudiokuenzler.com/blog/192/install-perl-dbd-oracle-DBD::Oracle-on-SuSE-SLES10-without-cpan" target="_blank">http://www.claudiokuenzler.com/blog/192/install-perl-dbd-oracle-DBD::Oracle-on-SuSE-SLES10-without-cpan</a>
<br>
<br>
You should do it the way you prefer of course. But in my setup I
wanted to run check_oracle_health on a standalone Nagios server.
That way I also see if there's a latency in the remote sql
query. Real life applications rarely use localhost connections.<br>
<br>
<div class="gmail_quote">On Wed, Oct 3, 2012 at 8:14 AM, Cosmin
Neagu <span dir="ltr"><<a href="mailto:cosmin.neagu@omnilogic.ro" target="_blank">cosmin.neagu@omnilogic.ro</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Well, thats the hard part for me, installing those
ORA files - didnt find yet how to do that. I think
installing the plugin on DBServer and using NRPE is
easier.
<div><br>
<pre cols="72"> Cosmin Neagu
NOC Team Leader
Str. I. G. Duca nr. 36
Otopeni, Judetul Ilfov, 075100 Romania
Tel: 021 303 3159 / 0732 669 193
<a href="http://www.omnilogic.ro" target="_blank">www.omnilogic.ro</a>
</pre>
</div>
<div>
<div> On 10/02/2012 06:05 PM, Claudio
Kuenzler wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div><br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> The plugin needs to be
installed on the Oracle Database server.<br>
</blockquote>
<div><br>
That's not entirely correct. It can also run on
a standalone Nagios server.<br>
But you need to install the ora files to be able
to launch the plugin against an Oracle DB
server.<br>
I did that successfully on Nagios 3.3.1 against
ORA11. <br>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<div>
<pre>------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
<a href="http://p.sf.net/sfu/newrelic-dev2dev" target="_blank">http://p.sf.net/sfu/newrelic-dev2dev</a></pre>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Nagios-users mailing list
<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null</pre>
</div>
</blockquote>
<br>
</div>
<br>
------------------------------------------------------------------------------<br>
Don't let slow site performance ruin your business. Deploy
New Relic APM<br>
Deploy New Relic app performance management and know exactly<br>
what is happening inside your Ruby, Python, PHP, Java, and
.NET app<br>
Try New Relic at no cost today and get our sweet Data Nerd
shirt too!<br>
<a href="http://p.sf.net/sfu/newrelic-dev2dev" target="_blank">http://p.sf.net/sfu/newrelic-dev2dev</a><br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and
OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to
/dev/null<br>
</blockquote>
</div>
<br>
<br>
<fieldset></fieldset>
<br>
<pre>------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
<a href="http://p.sf.net/sfu/newrelic-dev2dev" target="_blank">http://p.sf.net/sfu/newrelic-dev2dev</a></pre>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Nagios-users mailing list
<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null</pre>
</blockquote>
<br>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
<a href="http://p.sf.net/sfu/appdyn_sfd2d_oct" target="_blank">http://p.sf.net/sfu/appdyn_sfd2d_oct</a></pre><div class="im">
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Nagios-users mailing list
<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null</pre>
</div></blockquote>
<br>
</div>
<br>------------------------------------------------------------------------------<br>
The Windows 8 Center - In partnership with Sourceforge<br>
Your idea - your app - 30 days.<br>
Get started!<br>
<a href="http://windows8center.sourceforge.net/" target="_blank">http://windows8center.sourceforge.net/</a><br>
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/<br>_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>