[Nagios-devel] Inheriting contact_name does not work (any more?)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] Inheriting contact_name does not work (any more?)

Post by Guest »

Hi List,

I wanted to use a similar config to this one:

define contact{
register 0
use generic-contact
name foobar-admin
contact_name foobar
}

define contact{
use foobar-admin
pager +12345
}

to separate pager/mail addresses into another config file.
Unfortunately this doesn't work - the second contact definition is
silently ignored.

I had a look at xodtemplate.c and this shows that even though the
contact gets correctly added to the global xodtemplate_contact_list, it
is not added to the appropriate skiplist because skiplist_insert() is
only called when contact_name is directly specified.

However, xodtemplate_resolve_contact() tries to inherit contact_name so
I guess this behaviour was introduced with the skiplists.

A possible solution would be to add the call to skiplist_insert() into
the resolve function where the inheritance takes place, or to maybe
entirely move skiplist_insert() calls to
xodtemplate_end_object_definition().

Thoughts?

Matthias






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked