alerts not reaching me

Marc Powell marc at ena.com
Tue Sep 28 22:39:33 CEST 2004


----Original Message----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Payal
Rathod Sent: Tuesday, September 28, 2004 1:48 PM To:
nagios-users at lists.sourceforge.net Subject: Re: [Nagios-users] alerts
not reaching me 

> On Tue, Sep 28, 2004 at 01:14:06PM -0500, Marc Powell wrote:
> > 
> > In the log entry above, there is no '/bin/mail' after the '|' in
> > ...'Packet loss = 0%, RTA = 570.19 ms" |  -s "**'... Therefor the
> > shell is looking for a command named '-s' to pipe the printf output
> > to which of course doesn't exist. Does your command definition
> > include '| /bin/mail -s "**'...?
> 
> I have in my misccommands.cfg,
> 
> # 'notify-by-email' command definition
> define command{
>         command_name    notify-by-email
> 	        command_line    /usr/bin/printf "%b" "***** Nagios 1.0
> 		        *****\n\nNotification Type:
$NOTIFICATIONTYPE$\n\nService:
> $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
> $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional
> Info:\n\n$OUTPUT$" |  -s "** $NOTIFICATIONTYPE$ alert -
> $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ }    
> 
> What do I change?

# 'notify-by-email' command definition
define command{
        command_name    notify-by-email
	        command_line    /usr/bin/printf "%b" "***** Nagios 1.0
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$"
| /path/to/mail -s "** $NOTIFICATIONTYPE$ alert -
$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
		        }

Replace '/path/to/mail' with the location of your 'mail' program,
usually /bin/mail or /usr/bin/mail.

--
Marc


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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