notifications customized

Michael Gale michael.gale at utilitran.com
Wed Feb 11 21:43:11 CET 2004


Hello,

	Check the /nagios/etc/misccommands.cfg file. I believe it is at the very
bottom. You can customize the e-mails or pages any way you want. For exmaple I
do not have a smtp server on the nagios machine.

I do however have a email script setup (which is like the sendmail
[mail]) command only.

So I have customized mine to use this command to send mail.

Before
--snip--
define command{
        command_name    notify-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios 
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost:
$HO STALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | mail -s "** $NOTIFICATIONTYPE$
alert-$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$        }
--snip--

After
--snip--
define command{
        command_name    notify-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios 
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost:
$HO STALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /home/nagios/email "** $NOT
IFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **"
$CONTACTEMAIL$        



On Wed, 11 Feb 2004 13:32:27 -0600
Roger <grunky at rockriver.net> wrote:

> I got a notification from nagios that a host was down.  The message body 
> is below..
> 
> ***** Nagios  *****
> 
> Notification Type: PROBLEM
> Host: bruin
> State: DOWN
> Address: x.x.x.x
> Info: CRITICAL - Plugin timed out after 10 seconds
> 
> Date/Time: Wed Feb 11 12:24:21 CST 2004
> 
> 
> 
> This is great, however is there a way to include a url along w/ the
> notification?  Say a "click here to check status".
> 
> 
> 
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> 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
> 
> 
> 
> 


-- 
Michael Gale
Network Administrator
Utilitran Corporation


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
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