I've had it working fine with DBI and DBD-Oracle before. I've also been using Win32-Processes to check Process information, so I don't think it should matter.
The only thing drastically different about this script is that it loads the config settings (Db, user, pass, etc) in from an XML config script using Config-XMLPerl. Any ideas? Cheers Gavin -----Original Message----- From: Rodrick Brown [mailto:[EMAIL PROTECTED] Sent: 28 April 2008 16:01 To: Gavin Williams; [EMAIL PROTECTED] Cc: nagios-users@lists.sourceforge.net Subject: RE: [Nagios-users] Strange NRPE Problem... I don't believe it's possible to use Nagios/Nrpe scripts with 3rd party modules I briefly read something about this in the documentation. Try testing with a very basic 3rd party module that you know must work under almost any condition. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gavin Williams Sent: Monday, April 28, 2008 10:57 AM To: [EMAIL PROTECTED] Cc: nagios-users@lists.sourceforge.net Subject: Re: [Nagios-users] Strange NRPE Problem... The NRPE Demon is running under the Local System account - all my previous DB scripts have worked fine, so not sure why this one is any different... Not sure of any ways of explicitly testing it under the Local System account... Cheers Gavin -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 28 April 2008 15:50 To: Gavin Williams Cc: nagios-users@lists.sourceforge.net Subject: Re: [Nagios-users] Strange NRPE Problem... Does it work locally if you run it as the same user as the NRPE daemon is running? On 4/28/08, Gavin Williams <[EMAIL PROTECTED]> 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 .= [EMAIL PROTECTED]"\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. > ________________________________________________________________________ ________________________________________________________________________ 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@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 ________________________________________________________________________ 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@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