Fixing Nagios' email alerts
Elmar van Mourik
elmarvmo at gmail.com
Fri Oct 8 11:10:28 CEST 2004
Phil,
This is setup in 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$ a
lert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
The subject is (/usr/bin/mail -s):
"** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **"
The "To" fiels is $CONTACTEMAIL$
This is depending on the contactgroups.cfg and contacts.cfg and the
contact_group in your service config.
Elmar
On Fri, 8 Oct 2004 00:55:48 -0700, Phil Dibowitz <phil at usc.edu> wrote:
> This is a repost, but is there a way to make Nagios set a "Subject" and a "To"
> field in it's email alerts?
>
> --
> Phil Dibowitz
> Systems Architect and Administrator
> Enterprise Infrastructure / ISD / USC
> UCC 174 - 213-821-5427
>
>
>
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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