[Nagiosplug-help] Perl plugin : Return code of 13 is out of bounds

Subhendu Ghosh sghosh at sghosh.org
Thu Jun 19 10:11:09 CEST 2003


did you compile with embedded or cache perl?

normally nagios will re-init the perl interpreter after every 100 or so 
calls.

-sg

On Thu, 19 Jun 2003, Jean-Francois Levesque wrote:

> I executed my plugin from a system() call in another perl script and the 
> return code is '0'.
> 
> I think nagios has a perl script cache???  Is it possible to flush 
> nagios cache?
> 
> JF
> 
> Subhendu Ghosh wrote:
> > perl -d ./plugin (run thru the perl debugger)
> > 
> > echo $? ( what was the last return code )
> > 
> > -sg
> > 
> > 
> > On Thu, 19 Jun 2003, Jean-Francois Levesque wrote:
> > 
> > 
> >>My %ERRORS :
> >>
> >>use strict;
> >>use lib "/virtual/nagios/libexec";
> >>use utils qw(%ERRORS);
> >>
> >>Nope, I haven't test with the debugger.  How do I use the debugger?
> >>
> >>When I run the command in my shell the output is ok.  I don't see the 
> >>return code.
> >>
> >>JF
> >>
> >>
> >>Subhendu Ghosh wrote:
> >>
> >>>This looks fine assuming you defined %ERRORS correctly.
> >>>
> >>>Did you run it through the perl debugger?
> >>>Are you getting the same return code on the command line?
> >>>
> >>>-sg
> >>>
> >>>On Thu, 19 Jun 2003, Jean-Francois Levesque wrote:
> >>>
> >>>
> >>>
> >>>>Well, this is the output and the exit code :
> >>>>
> >>>>
> >>>>if ($sth->fetchrow_array()) { print "MYSQL-REPLICATION OK - Cool\n"; 
> >>>>$exit = 0;}
> >>>>else { print "MYSQL-REPLICATION CRITICAL - Bad\n"; $exit = 2;}
> >>>>
> >>>>(...)
> >>>>
> >>>>if ($exit == 0) { exit $ERRORS{'OK'}; }
> >>>>else { exit $ERRORS{'CRITICAL'}; }
> >>>>
> >>>>
> >>>>Anything wrong?
> >>>>
> >>>>JF
> >>>>
> >>>>
> >>>>Subhendu Ghosh wrote:
> >>>>
> >>>>
> >>>>>On Thu, 19 Jun 2003, Jean-Francois Levesque wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>Hi!
> >>>>>>
> >>>>>>I have made a perl plugin and I get this error :  Return code of 13 is 
> >>>>>>out of bounds.  I haven't found any documentation about this error.  I 
> >>>>>>have read the section about perl plugins on 
> >>>>>>http://nagiosplug.sourceforge.net/developer-guidelines.html but it 
> >>>>>>didn't change anything.
> >>>>>>
> >>>>>>I have already checked http://www.nagios.org/faqs/viewfaq.php?faq_id=17 
> >>>>>>but no success...
> >>>>>>
> >>>>>
> >>>>>
> >>>>>The return code is something that is returned by the plugin.
> >>>>>
> >>>>>Without looking at your code, we really can't say.
> >>>>>
> >>>>
> >>>>
> >>
> >>
> >>
> >>-------------------------------------------------------
> >>This SF.Net email is sponsored by: INetU
> >>Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> >>Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> >>INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> >>_______________________________________________
> >>Nagiosplug-help mailing list
> >>Nagiosplug-help at lists.sourceforge.net
> >>https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> >>::: Please include plugins version (-v) and OS when reporting any issue. 
> >>::: Messages without supporting info will risk being sent to /dev/null
> >>
> > 
> > 
> 
> 

-- 






More information about the Help mailing list