<div class="gmail_quote"><div>Hi again,<br>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.<br>
But now, even stranger, no notification is sent. I mean I enabled debug in nagios.cfg and the result is:<br><br>[1231482452.131909] [032.0] [pid=16674] ** Host Notification Attempt ** Host: 'h<br>ost1', Type: 0, Options: 0, Current State: 1, Last Notification: Thu Jan  1<br>
 02:00:00 1970<br>[1231482452.132086] [032.0] [pid=16674] Notification viability test passed.<br>[1231482452.132104] [032.1] [pid=16674] Current notification number: 1 (incremen<br>ted)<br>[1231482452.132127] [032.1] [pid=16674] Host notification will NOT be escalated.<br>
[1231482452.132241] [032.1] [pid=16674] Adding normal contacts for host to notif<br>ication list.<br>[1231482452.132504] [032.0] [pid=16674] No contacts were notified.  Next possibl<br>e notification time: Thu Jan  1 02:00:00 1970<br>
[1231482452.132524] [032.0] [pid=16674] 0 contacts were notified.<br><br>Now more than ever I don't understand why no contacts were notified! It can mean that normal contacts doesn't exist?<br><br><br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
> So I guess that nagios is not getting right the  $CONTACTEMAIL$<br>
> macro substitution.<br>
><br>
> I don't know exactly the inner works that means that if it's correct<br>
> to define a host and use a template for providing the contact group<br>
> and from the contact group nagios can extract the email addresses<br>
> and put them in $CONTACTEMAIL$<br>
<br>
</div>I expect this to work fine.<br>
<div class="Ih2E3d"><br>
> Also, the services are not notified also; the same happens (the<br>
> email sustituted from $CONTACTEMAIL$ seems to be $???).<br>
<br>
</div>I suspect that the more likely reason is that nagios is not replacing<br>
$CONTACTEMAIL$ with it's proper value before passing it on to the<br>
shell for some strange reason. The shell then interprets '$CONTACTEMAIL<br>
$' as a null shell variable of '$CONTACTEMAIL' followed by a literal<br>
'$' so you end up with the results your seeing (you could see this by<br>
enabling debug mode). The question is why nagios isn't doing the<br>
substitution properly. The most likely cause is that the macro is<br>
mistyped but that really doesn't look like the case.<br>
<br>
Actually, now that I'm reviewing your original posting. I'm exactly<br>
sure that nagios isn't performing the subtitution at all. In your host<br>
template (and probably service template), you specify the notification<br>
commands as event_handlers. This is not a correct use of event<br>
handlers as the $CONTACTEMAIL$ macro (and others) are not valid for<br>
them. Disable event_handler_enabled and remove event_handler and you<br>
should be fixed. The notifications will still go out through the<br>
normal notification process.<br>
<div><div></div><div class="Wj3C7c"><br>
--<br>
Marc<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Check out the new SourceForge.net Marketplace.<br>
It is the best place to buy or sell services for<br>
just about anything Open Source.<br>
<a href="http://p.sf.net/sfu/Xq1LFB" target="_blank">http://p.sf.net/sfu/Xq1LFB</a><br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br>
</div></div></blockquote></div><br>