notifications not working

Marc Powell mpowell at ena.com
Wed Nov 26 19:35:16 CET 2003



> -----Original Message-----
> From: André Barros [mailto:decobarros at hotmail.com]
> Sent: Wednesday, November 26, 2003 12:14 PM
> To: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] Re: notifications not working
> 

[snip snip]

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

Try using echo -e instead of printf and see if that makes a difference:

command_line	/bin/echo -e "***** Nagios  *****\n\nNotification 
Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: 
$HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: 
$DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /usr/bin/mail -s "** 
$NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" 
$CONTACTEMAIL$


The host and service definitions look ok to me.

--
Marc


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
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