[Nagiosplug-help] [Nagios-users] Help with eventhandlers

Marc Powell marc at ena.com
Fri Dec 7 01:09:19 CET 2007



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Carole Gimenez
> Sent: Thursday, December 06, 2007 11:08 AM
> To: Nagios Users; nagiosplug-help at lists.sourceforge.net
> Subject: [Nagios-users] Help with eventhandlers
> 
> Hi,
> 
> For some time, i execute severals evenhandlers to restart services.
Now,
> i would send an email when an eventhandler is executed. So, in
commands
> file, i modified my eventhandler 'restart-httpd-test' like this:
> usr/local/nagios/libexec/eventhandlers/restart-httpd-test
$SERVICESTATE$
> $STATETYPE$ $SERVICEATTEMPT$ $HOSTADDRESS$ $HOSTNAME$ $CONTACTEMAIL$
2>>
> /usr/local/nagios/tmp/httpd-test.log
> 
> My problem is that i don't arrive to recovered the macro
$CONTACTEMAIL$.

With Nagios-2, $CONTACTEMAIL$ isn't available for event handlers, only
notifications. See the chart at
http://nagios.sourceforge.net/docs/2_0/macros.html. I can't offer any
suggestions other than creating your own special file with that
information and grep it from there when needed or parsing the nagios
config files to obtain it.

With nagios-3, that information is available with the new
$CONTACTGROUPMEMBERS$ macro.




More information about the Help mailing list