Perl plugin exit code?
Jeff
jsmforum at optonline.net
Tue Sep 6 22:24:22 CEST 2005
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net
> [mailto:nagios-users-admin at lists.sourceforge.net] On Behalf
> Of Tedman Eng
> Sent: Tuesday, September 06, 2005 16:17
> To: nagios-users at lists.sourceforge.net
> Cc: 'Jeff'
> Subject: RE: [Nagios-users] Perl plugin exit code?
>
>
>
> > Second part of my question has to do with perl more than nagios,
> > Obviously I need to send the correct exit code to nagios. I set a
> > varialble "$status" (0, 1 or 2) in the script according to
> the query
> > results and at the end of the script I have
> >
> > Exit $status;
> >
>
> The command will not work unless "exit" is lower case.
> This may be so in your script, but wasn't in your email.
> (it won't hurt to look again to make sure)
>
>
> $ perl -e '$status=0;exit $status'; echo $?
> 0
>
> $ perl -e '$status=2;Exit $status'; echo $?
> Can't call method "Exit" without a package or object
> reference at -e line 1. 255
>
That's not the problem, it is lowercase in my script. My email client
capitolized it because it was on it's own line.
Thanks though....
Jeff
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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