Nagios "from" address change
Christopher Odenbach
odenbach at uni-paderborn.de
Tue May 22 09:40:14 CEST 2007
Hi,
> My apologies in advance if this question has been hashed out here
> before. I have a request from management to change the "from" address
> in Nagios alerts. In other words, notifications come from "nagios@,
> my boss would like to see it be something different, as in
> "WhateverAlerts@". I've tried playing with genericstable in sendmail,
> and have been unsuccessful. Is there another way to do this?
We do:
define command{
command_name notify-by-email
command_line /usr/bin/printf "%b" "***** Nagios
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nState: $SERVICESTATE$\n\nDate/Time:
$LONGDATETIME$\n\nAdditional Info:
\n\n$SERVICEOUTPUT$" | /usr/bin/mail -a "From:
linux-intern at zitmail.uni-paderborn.de" -a "Return-Path:
linux-intern at zitmail.uni-paderborn.de" -a "List-Id: Nagios
<nagios.uni-paderborn.de>" -s "[Nagios] **$SERVICEDESC$ at $HOSTALIAS$
($NOTIFICATIONTYPE$) **" $CONTACTEMAIL$
}
So /usr/bin/mail allows you to add additional headers, like "From"
or "List-Id".
Christopher
--
======================================================
Dipl.-Ing. Christopher Odenbach
Zentrum fuer Informations- und Medientechnologien
Universitaet Paderborn
Raum N5.110
odenbach at uni-paderborn.de
Tel.: +49 5251 60 5315
======================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070522/a8ce7c2c/attachment.sig>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
-------------- next part --------------
_______________________________________________
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