putting a Subject into the notification email

Artyom Khmelnitsky nagios at ayksolutions.com
Thu Mar 8 12:43:45 CET 2007


 Hello,

What command do you use to give the notification email a subject. Right now, if a box is down, it just sends an email with no subject at all. It would be nice to put a subject in there that has the Host's IP for instance.

Currently, here's what we have:

# 'host-notify-by-email' command definition
define command{
command_name host-notify-by-email
command_line /usr/bin/printf "%b" "\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/lib/sendmail "Host $HOSTSTATE$ alert for $HOSTNAME$" $CONTACTEMAIL$
}

I take it the part after '| /usr/lib/senmail' is the subject of the email. Anyone know why it does not process it? We currently usq qmail server.

Thank you for the help!

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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