Re: [Nagios-devel] Customized macros not working for contacts
Posted: Fri May 04, 2012 10:25 am
On 05/03/2012 04:58 PM, Deborah Martin wrote:
> Thanks Andreas,
>
>>> Are environment macros are turned on and
>>> large_installation_tweaks turned off? Otherwise, it's not
>>> supposed to work.
> Yes for both settings
>
> I do see your point about a fix. It's a shame because setting this in
> the contact definition would have made some event handlers easier to
> write.
>
> At the moment my event handler has to be customized per customer to
> get the right email contacts but if I could define a customized macro
> in the contact definition, I only need use that in my event handler
> script and then I don't need to worry about a different event handler
> per customer making it as generic as possible. Things like warning
> and critical thresholds are parsed based on customer requirements
> rather than hardcoded so I was hoping I could do that with contacts.
>
> Is there a different way of achieving this ?
>
Use the macro as a command-line parameter from Nagios' config. From
what I read in your original mail, that seemed to work well, no?
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> Thanks Andreas,
>
>>> Are environment macros are turned on and
>>> large_installation_tweaks turned off? Otherwise, it's not
>>> supposed to work.
> Yes for both settings
>
> I do see your point about a fix. It's a shame because setting this in
> the contact definition would have made some event handlers easier to
> write.
>
> At the moment my event handler has to be customized per customer to
> get the right email contacts but if I could define a customized macro
> in the contact definition, I only need use that in my event handler
> script and then I don't need to worry about a different event handler
> per customer making it as generic as possible. Things like warning
> and critical thresholds are parsed based on customer requirements
> rather than hardcoded so I was hoping I could do that with contacts.
>
> Is there a different way of achieving this ?
>
Use the macro as a command-line parameter from Nagios' config. From
what I read in your original mail, that seemed to work well, no?
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]