Help - I am unable to send notifications

jonathan williams jonathan.williams at us.g4s.com
Tue Jul 22 22:43:26 CEST 2008


On Tue, 2008-07-22 at 12:13 -0700, Marc Powell wrote:
> 
> 
> > -----Original Message-----
> > From: nagios-users-bounces at lists.sourceforge.net
> [mailto:nagios-users-
> > bounces at lists.sourceforge.net] On Behalf Of Marc Powell
> > Sent: Tuesday, July 22, 2008 1:15 PM
> > To: Nagios User list
> > Subject: Re: [Nagios-users] Help - I am unable to send notifications
> >
> >
> 
> 
> > > root at LOOKINIUM:/usr/local/nagios/libexec# sed -i
> '1s,.*,#!/usr/bin/
> > > perl
> > > -w,' check_sendmail.pl
> > > sed: can't read check_sendmail.pl: No such file or directory
> >
> > Ok. sed 101.
> >
> > sed -i '1s,.*,#!/usr/bin/perl -w,' check_sendmail.pl
> 
> 
> > Your confusion is that the filename should have been check_mail.pl,
> > not check_sendmail.pl.
> 
> Correction. It should have been send_mail.pl, not check_sendmail.pl.
> 
> --
> Marc
> 

Bummer.  I made the change and did not get any errors, however I am
still getting the same error in the nagios.log:

[1216757322] Warning: Attempting to execute the command
"/usr/local/nagios/libexec/send_mail.pl -n "SERVICE PROBLEM" -h
"jwilliamspc" -s "CRITICAL" -a "10.10.113.51" -i "PrintSpooler -
Spooler: Stopped - check_nt!SERVICESTATE!-d SHOWALL -l Spooler" -d "Tue
Jul 22 13:08:42 PDT 2008" -e "jonathan.williams at us.g4s.com"" resulted in
a return code of 126.  Make sure the script or binary you are trying to
execute actually exists.

I am not sure if it is permissions or not.  The user nagios is the owner
of this file and should have access.  I ran this from the command
prompt, but realize the $wildcards$ will have no meaning from here.

root at LOOKINIUM:/usr/local/nagios/libexec# /usr/local/nagios/libexec/send_mail.pl -n "HOST $NOTIFICATIONTYPE$" -h "$HOSTNAME$"  -s "$HOSTSTATE$" -a "$HOSTADDRESS$" -i "$HOSTOUTPUT$" -d "$LONGDATETIME$" -e "$CONTACTEMAIL$"
bash: /usr/local/nagios/libexec/send_mail.pl: Permission denied
root at LOOKINIUM:/usr/local/nagios/libexec#
sudo /usr/local/nagios/libexec/send_mail.pl -n "HOST $NOTIFICATIONTYPE$"
-h "$HOSTNAME$"  -s "$HOSTSTATE$" -a "$HOSTADDRESS$" -i "$HOSTOUTPUT$"
-d "$LONGDATETIME$" -e "$CONTACTEMAIL$"
sudo: /usr/local/nagios/libexec/send_mail.pl: command not found

The first attempt was run as logged in user (zlocaladmin) which does not
have rights.  Not sure why it still gave permissions error since I ran
sudo - long before in that session and everything else I can run without
the sudo command.  Anyhow when run with root access I get the command
not found error.  I'm stumped.



> 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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