Customizing alerts to add acknowledgements to emails?

Greg Vickers g.vickers at qut.edu.au
Tue Jan 11 00:34:42 CET 2005


Dan, here is how I do it:

define command{
    command_name service-notify-by-email
    command_line echo -e "Note: DO NOT REPLY TO THIS EMAIL\n\nThe 
service \"$SERVICEDESC$\" on host \"$HOSTALIAS$\" at IP $HOSTADDRESS$ is 
in a $SERVICESTATE$ state.\n\nThe output from the service check: 
$OUTPUT$\n\nService 
URL:\"http://nagios.<server>/nagios/cgi-bin/extinfo.cgi?type=2&host=$HOSTNAME$&service=$SERVICEDESC$\"\n(Note: 
This link will take you to the service problem and not show the 
sidebar.)\n\nNagios homepage: http://nagios.<server>/" | mail -s 
"$HOSTNAME$ has a service in an $SERVICESTATE$ state" $CONTACTEMAIL$ -a 
"From: nagiosadmin at nagios.<server>"
    }

Appropriately sanitized.

HTH,
Greg

Dan Clark wrote:
> Hi Guys, just wondering if anyone knows where the messages are generated 
> from for email notifications?
> I'd like to add an <a href> at the bottom of the email to acknowledge 
> the problem by just clicking on the link.
> If anyone has come across this already please let me know.
> 
> Kind Regards
> Dan Clark
> Technical Director
> Syanptic Ltd
> 
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> 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
> 

-- 
Greg Vickers
Security Engineer
Network Services
Information Technology Services
Queensland University of Technology

email: g.vickers at qut.edu.au
phone: (07) 3864 9536

CIROS code: 00213J


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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