Customized macros not working for contacts

Deborah Martin Deborah.Martin at kognitio.com
Fri May 4 17:44:34 CEST 2012


Jochen, 

Thanks. Yes, I can create another template and add that as you suggest. I'd hoped to keep contacts defined within a contact definition and since it's documented that it should work .... 

But I'll try it out as you suggest and go from there. 

Regards,
Deborah 
Frustration=Finding something that you want to use documented only to find out it doesn't work! 

-----Original Message-----
From: Jochen Bern [mailto:Jochen.Bern at LINworks.de] 
Sent: 04 May 2012 16:02
To: Nagios Developers List
Cc: Deborah Martin
Subject: Re: [Nagios-devel] Customized macros not working for contacts

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


This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.  If you are not the intended recipient, please delete this e-mail immediately.  Any unauthorised distribution or copying is strictly prohibited.

Whilst Kognitio endeavours to prevent the transmission of viruses via e-mail, we cannot guarantee that any e-mail or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Kognitio grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.
------------------------------------------------------------------------------
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