Strange NRPE Problem...

Gavin Williams Gavin.Williams at card.co.uk
Mon Apr 28 17:10:15 CEST 2008


Windows 2003 server, Perl5Lib and path set up correctly...

Cheers
Gavin

-----Original Message-----
From: richard at quintinz.com [mailto:richard at quintinz.com] On Behalf Of
Richard Quintin
Sent: 28 April 2008 16:06
To: Gavin Williams
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Strange NRPE Problem...

You might also check your PERL5LIB and LD_LIBRARY_PATH environment
variables (assuming *nix).

On Mon, Apr 28, 2008 at 10:57 AM, Richard Quintin <rich at quintinz.com>
wrote:
> When you run it locally do you have TNS_ADMIN set?  You might check
>  out a patch I recently submitted for check_oracle to allow you to use
>  Oracle Easy Connect.
>
>
http://sourceforge.net/tracker/index.php?func=detail&aid=1945210&group_i
d=29880&atid=397599
>
>  On Mon, Apr 28, 2008 at 10:44 AM, Gavin Williams
>  <Gavin.Williams at card.co.uk> wrote:
>  >
>  >
>  >
>  >
>  > Hi there,
>  >
>  >
>  >
>  > I'm having some strange NRPE behaviour.
>  >
>  > I've written a Perl script that runs a load of checks on our
systems, but
>  > the ones that are causing the problem are any checks that want to
connect to
>  > Oracle via DBI.
>  >
>  >
>  >
>  > The error it's giving me is:
>  >
>  > DBI connect('','',...) failed: ORA-12560: TNS:protocol adapter
error (DBD
>  > ERROR: OCIServerAttach) at nagios_checks.pl line 82
>  >
>  >
>  >
>  > Now this command works fine if I run it locally on the server,
however when
>  > using NRPE it throws the above error.
>  >
>  >
>  >
>  >
>  > The lines in question in my script look like this:
>  >
>  > sub dbConnect
>  >
>  > {
>  >
>  >             my $dbh;
>  >
>  >             eval
>  >
>  >             {
>  >
>  >                         $dbh =
>  > DBI->connect("dbi:Oracle:$database","$username","$password",{
RaiseError =>
>  > 1, AutoCommit => 0, PrintError => 0})
>  >
>  >                         || die "failed to connect to $database\n";
>  >
>  >             };
>  >
>  >             if ($@)
>  >
>  >             {
>  >
>  >                         my $msg .= $@."\n";
>  >
>  >                         die "$msg\n";
>  >
>  >             }
>  >
>  >
>  >
>  >             return $dbh;
>  >
>  >
>  > }
>  >
>  > The username, password and database get loaded in from a XML Config
file...
>  > But it all works locally???
>  >
>  >
>  >
>  > Any ideas?
>  >
>  >
>  >
>  > Cheers
>  >
>  > Gavin
>  >
________________________________________________________________________
>  >  Please consider the environment - do you really need to print this
email?
>  >
________________________________________________________________________
>  >  This email has been scanned for all viruses by the MessageLabs
Email
>  >  Security System - http://www.messagelabs.com.
>  >
________________________________________________________________________
>  >
>  >
------------------------------------------------------------------------
-
>  >  This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>  >  Don't miss this year's exciting event. There's still time to save
$100.
>  >  Use priority code J8TL2D2.
>  >
>  >
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
avaone
>  > _______________________________________________
>  >  Nagios-users mailing list
>  >  Nagios-users at lists.sourceforge.net
>  >  https://lists.sourceforge.net/lists/listinfo/nagios-users
>  >  ::: Please include Nagios version, plugin version (-v) and OS when
>  > reporting any issue.
>  >  ::: Messages without supporting info will risk being sent to
/dev/null
>  >
>
>
>
>  --
>  Richard Quintin, DBA
>  Database & Application Administration
>  Virginia Tech
>



-- 
Richard Quintin, DBA
Database & Application Administration
Virginia Tech

________________________________________________________________________
Please consider the environment - do you really need to print this email?
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System - http://www.messagelabs.com.
________________________________________________________________________

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list