No notifications sent out, but need direct recipients?

Marc Powell marc at ena.com
Sat Nov 5 16:02:04 CET 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of u q
> Sent: Friday, November 04, 2005 9:06 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] No notifications sent out, but need direct
> recipients?
> 
> Nagios(v2.0b4) seems to work ok, but no notifications
> were sent out. The message "You must specify direct
> recipients with -s,-c, or -b" displayed when status
> changed.
> 
> service_notification_commands,host_notification_commands
> all specified notify-by-epager, it's as following:
> # 'notify-by-epager' command definition
> define command{
>         command_name    notify-by-epager
>         command_line    /usr/bin/printf "%b" "Service:
> $SERVICEDESC$\nHost: $HOSTNAME$\nAddress:
> $HOSTADDRESS$\nState: $SERVICESTATE$\nInfo:
> $SERVICEOUTPUT$\nDate: $LONGDATETIME$"  -b  |
> /bin/mail -s "$NOTIFICATIONTYPE$:
> $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$"
> $CONTACTPAGER$
>         }
> 
> 
> where to specify direct recipients?

It seems odd that error message shows as status information on the web
page. Is that correct? What is your host or service definition and the
command definition? Presuming that this is really a notification error
--

Your notify-by-epager command uses /bin/mail to send the message. You
can see it above near the end of the command. -s is the subject of the
message ("$NOTIFICATIONTYPE$: $HOSTALIAS$/$SERVICEDESC$ is
$SERVICESTATE$") followed immediately by the contact e-mail address
($CONTACTPAGER$). It would appear that you have a different/newer
version of /bin/mail that requires an argument identifier before the
$CONTATPAGER$. Use 'man mail' to determine the correct flag and syntax
to use and modify the command above appropriately.

Snippet from standard 'mail' man page --

"NAME

     mail - send and receive mail

SYNOPSIS

     mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr..."

If you can't figure it out, please let us know the OS you are using and
version of /bin/mail.

An alternative explanation may be that when the macros are populated
with real info your $HOSTALIAS$ or $SERVICEDESC$ contain a '"' character
causing the quotes passed to /bin/mail to be wrong.

--
Marc


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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