nagios 3.0.5 email notifications fail

alex alex fdm.alex at gmail.com
Fri Jan 9 18:26:08 CET 2009


Hi again,
I've just disabled events handler. I think youwere right. The dead emails
were from events handler, not from notifications. No new notifications
failed in letter.dead It seems that in event handler, the $CONTACTEMAIL$ is
not set.
But now, even stranger, no notification is sent. I mean I enabled debug in
nagios.cfg and the result is:

[1231482452.131909] [032.0] [pid=16674] ** Host Notification Attempt **
Host: 'h
ost1', Type: 0, Options: 0, Current State: 1, Last Notification: Thu Jan  1
 02:00:00 1970
[1231482452.132086] [032.0] [pid=16674] Notification viability test passed.
[1231482452.132104] [032.1] [pid=16674] Current notification number: 1
(incremen
ted)
[1231482452.132127] [032.1] [pid=16674] Host notification will NOT be
escalated.
[1231482452.132241] [032.1] [pid=16674] Adding normal contacts for host to
notif
ication list.
[1231482452.132504] [032.0] [pid=16674] No contacts were notified.  Next
possibl
e notification time: Thu Jan  1 02:00:00 1970
[1231482452.132524] [032.0] [pid=16674] 0 contacts were notified.

Now more than ever I don't understand why no contacts were notified! It can
mean that normal contacts doesn't exist?




>
> > 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$
>
> I expect this to work fine.
>
> > Also, the services are not notified also; the same happens (the
> > email sustituted from $CONTACTEMAIL$ seems to be $???).
>
> I suspect that the more likely reason is that nagios is not replacing
> $CONTACTEMAIL$ with it's proper value before passing it on to the
> shell for some strange reason. The shell then interprets '$CONTACTEMAIL
> $' as a null shell variable of '$CONTACTEMAIL' followed by a literal
> '$' so you end up with the results your seeing (you could see this by
> enabling debug mode). The question is why nagios isn't doing the
> substitution properly. The most likely cause is that the macro is
> mistyped but that really doesn't look like the case.
>
> Actually, now that I'm reviewing your original posting. I'm exactly
> sure that nagios isn't performing the subtitution at all. In your host
> template (and probably service template), you specify the notification
> commands as event_handlers. This is not a correct use of event
> handlers as the $CONTACTEMAIL$ macro (and others) are not valid for
> them. Disable event_handler_enabled and remove event_handler and you
> should be fixed. The notifications will still go out through the
> normal notification process.
>
> --
> 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/20fd4a1f/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