On 05/04/2012 04:28 PM, Deborah Martin wrote:
> So my eventhandler would parse $SERVICESTATEID$ $HOSTALIAS$ and
> $_EMAILCONTACTID=20
>=20
> And in my eventhandler, I would have a line something like "echo
> | mailx -s "Results from $NAGIOS_HOSTALIAS"
> $NAGIOS__CONTACTEMAILCONTACTID=20
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 Handl=
er.
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/ ... tance.html
(Scroll to end of page)
Kind regards,
J. Bern
--=20
Jochen Bern, Systemingenieur --- LINworks GmbH
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP =3D D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C2=
7
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Gesch=C3=A4ftsf=C3=BChrer Metin Dogan, Oliv=
er Michel
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]