ePN: notification script
John R. Daily
jdaily at apparatus.net
Mon Mar 6 18:10:32 CET 2006
On Mar 6, 2006, at 12:56 AM, <Stanley.Hopcroft at Dest.gov.au>
<Stanley.Hopcroft at Dest.gov.au> wrote:
> It can be a great pain in the proverbial to get going. However, the
> docco suggests (perldoc p1.pl) that you can enable some debug/verbose
> output to find where the plugin/Perl code is blowing up.
Thanks for your insights.
Here's the bare minimum script I had originally set up for testing:
---
#!/usr/bin/perl -w
use utils qw(%ERRORS);
print "Perl here.\n\n";
exit($ERRORS{'OK'});
---
I have been swapping it out with a SH version, which works:
---
#!/bin/sh
echo "SH here"
echo ""
---
The debugging log that I set up as per Stanley's suggestion of
editing p1.pl:
Mon Mar 6 11:27:08 2006 eval_file: successfully compiled "/etc/
nagios/messages/test | /bin/mail -s "** PROBLEM alert - localhost/
HTTPD is CRITICAL **" jdaily at apparatus.net".
Mon Mar 6 11:27:08 2006 run_package: "/etc/nagios/messages/test | /
bin/mail -s "** PROBLEM alert - localhost/HTTPD is CRITICAL **"
jdaily at apparatus.net" returning (0, "Perl here.
").
So it looks to me as if ePN is fine with the script, but the output
does not seem to be delivered to /bin/mail as it is with the shell
version.
-John
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
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