Notify-by-email on Solaris 8 doesn't populate the subject
Marc Powell
marc at ena.com
Fri Mar 26 16:40:59 CET 2004
On Friday, March 26, 2004 9:31 AM, Narayanasamy, Sundar shared with us:
> Hello,
>
> Whenever I get a warning or error notification from my Nagios
> installation on my Solaris box, it comes with empty subject line. How
> do I fix it?
>
> This is what I have
>
> # '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: $SERVIC
> EDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
> $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional
> Info:\n\n$OUTP UT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert -
> $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ }
>
> Any help is appreciated.
Take a look at 'man mail' and make sure that the -s switch is used to
specify the subject on the command line. It may be different than other
distributions (I don't have a solaris machine handy). You might also try
using single quotes ' instead of double quotes " around the subject
portion of the command. Your host aliases or service descriptions don't
use any special characters in them do they? Anything outside
[A-Za-z0-9+_-]?
--
Marc
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
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