nagios 3.0.5 email notifications fail

alex alex fdm.alex at gmail.com
Fri Jan 9 15:42:30 CET 2009


ok, I get the service and not the host email from dead.letter. My mistake.
Here's the host one:

>From nagios Fri Jan  9 16:12:31 2009
Return-Path: <nagios>
Received: (from nagios at localhost)
        by localhost.localdomain (8.14.1/8.14.1/Submit) id n09ECVcx011087
        for $; Fri, 9 Jan 2009 16:12:31 +0200
Date: Fri, 9 Jan 2009 16:12:31 +0200
From: nagios
Message-Id: <200901091412.n09ECVcx011087 at localhost.localdomain>
To: $
Subject: ** $ Host Alert: host1 is DOWN **

***** Nagios *****

Notification:



I will try to see the error in command. I already use a modified command

 define command {
        command_name                    notify-host-by-email
        command_line                       /usr/bin/printf "%b" "Host:
$HOSTNAME$\n $CONTACTEMAIL$\n" |cat >>/tmp/testfile
}


and I get in the log file just:

Host: host1
 $
Host: host1
 $
Host: host1
 $


So I guess that nagios is not getting right the  $CONTACTEMAIL$ macro
substitution.

I don't know exactly the inner works that means that if it's correct to
define a host and use a template for providing the contact group and from
the contact group nagios can extract the email addresses and put them in
$CONTACTEMAIL$

Also, the services are not notified also; the same happens (the email
sustituted from $CONTACTEMAIL$ seems to be $???).

Thank you,

Alex




On Fri, Jan 9, 2009 at 3:30 PM, Marc Powell <marc at ena.com> wrote:

>
> On Jan 9, 2009, at 4:52 AM, alex alex wrote:
>
> > Subject: **  Service Alert: ITM_M._Ciuc/is_alive is OK **"
>
> This is a service alert.
>
> > Somehow it seems that no user address is found (or the address $ is
> > used ). Also, the mail log says the same thing:
>
>
> >
> > define contact {
> > [snip]
> >         host_notification_commands      notify-host-by-email
> >         service_notification_commands   notify-service-by-email
> >         register                        0
> > }
> >
> > define command {
> >         command_name                    notify-host-by-email
>
> This is not the commnad{} used for service alerts (look for notify-
> service-by-email). My expectation is that you have a typo at or near
> $CONTACTEMAIL$ there.
>
> --
> Marc
>
>
>
> ------------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It is the best place to buy or sell services for
> just about anything Open Source.
> http://p.sf.net/sfu/Xq1LFB
> _______________________________________________
> 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/20090109/cd028f07/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
-------------- 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