Customized macros not working for contacts

Jochen Bern Jochen.Bern at LINworks.de
Fri May 4 17:01:38 CEST 2012


On 05/04/2012 04:28 PM, Deborah Martin wrote:
> So my eventhandler would parse $SERVICESTATEID$ $HOSTALIAS$ and
> $_EMAILCONTACTID 
> 
> And in my eventhandler, I would have a line something like "echo
> <results> | mailx -s "Results from $NAGIOS_HOSTALIAS"
> $NAGIOS__CONTACTEMAILCONTACTID 

FWIW, you have a major systematic problem there. Event handlers are
triggered *once* per service (and event), while said service can have
*any* number of contacts with their individual sets of Custom Macros. In
your example, the service may have exactly one contact, but that's
something Nagios would need to learn to check for to ever even get the
idea that Contact Custom Macros might be well-defined in your Event Handler.

Hence, I'ld even say that *Service* Custom Macros is where your
additional data *belongs*.

You are aware that you can reference *several* templates, as in "use
dbcon-service,special-contact-template", to combine perpendicular
default settings?

http://nagios.sourceforge.net/docs/3_0/objectinheritance.html
(Scroll to end of page)

Kind regards,
								J. Bern
-- 
Jochen Bern, Systemingenieur --- LINworks GmbH <http://www.LINworks.de/>
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Geschäftsführer Metin Dogan, Oliver Michel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list