> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:nagios-users- > [EMAIL PROTECTED] On Behalf Of Carole Gimenez > Sent: Thursday, December 06, 2007 11:08 AM > To: Nagios Users; [EMAIL PROTECTED] > 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. ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Nagios-users mailing list Nagios-users@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