add info on the body of email

Claudio Kuenzler ck at claudiokuenzler.com
Sun Feb 5 14:29:30 CET 2012


Sure, you just need to modify the command, which sends the e-mail.
For example:

# 'notify-service-by-email' command definition
define command{
        command_name    notify-service-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: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$\nYOURURL" | /usr/bin/mailx -s "**
$NOTIFICATIONTYPE$ Serv
ice Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
        }


On Sun, Feb 5, 2012 at 2:11 PM, Nelson Serafica <ntserafica at gmail.com>wrote:

> I just want to confirm. Would it be possible to modify the email content
> for each services? I have an email alert and I want to put an info (e.g.
> url) on the content of the email. Below is sample of the email content.
>
> ***** Nagios *****
>
> Notification Type: PROBLEM
>
> Service: SMTP_25
> Host: mta
> Address: 10.0.1.20
> State: CRITICAL
>
> Date/Time: Sun Feb 5 21:02:47 EST 2012
>
> Additional Info:
>
> CRITICAL - Socket timeout after 10 seconds
> *<------ I want to put a URL here ----->*
>
>
>
>
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120205/a8ef76b5/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
-------------- 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