event handler macros
Andreas Ericsson
ae at op5.se
Mon Nov 7 16:40:47 CET 2005
Roy Kidder wrote:
> I'm writing a perl script that will be called as an event handler for a
> down/hard host. The idea behind the script is to generate some simple
> debugging output and email it to the contact group for the down host.
>
You're aware that this is what the contact object and such are for, right?
> The problem is that the contact group macro ($CONTACTEMAIL$) isn't
> available to event handlers.
>
> Does anyone have a suggestion on how I might determine the contact email
> for a host in such a case?
>
You can do it in a number of obscure and ridiculous ways, all of which
involve external files or weird name-standards.
The easiest is probably to set your script as notification command for a
contact. This will nicely bypass all the troubles (and be sane at the
same time).
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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