Nagios 4: Registering object relationships in CGIs
Andreas Ericsson
ae at op5.se
Wed Jan 16 18:37:12 CET 2013
On 01/16/2013 04:30 PM, Ton Voon wrote:
>
> On 14 Jan 2013, at 09:35, Ton Voon wrote:
>
>>
>> On 8 Jan 2013, at 10:16, Andreas Ericsson wrote:
>>
>>> On 01/08/2013 10:24 AM, Ton Voon wrote:
>>>> My original patch, reattached, is not ideal but fixes the problem, so I present it as a way to show why the current behaviour is wrong. I'm sure there's a better solution, probably some other "do expansion of object relationships" call that should be invoked instead, but I can't quite understand the C-fu magic that is going on with the new configuration code!
>>>>
>>>
>>> Thanks a lot. I'll get this fixed today.
>>
>> Have you had a chance to look at this? Alternatively, can you provide some pointers to where this might be and what to look out for?
>
> Hi Andreas,
>
> You're probably very busy, but can you provide some pointers for where to look please? There's some black magic going on which I can't decode!
>
Sorry for the delay.
Well, the story goes like this:
We would *actually* want to use the recombobulate_*groups() functions,
but those rely on find_*(), add_member_to_group() and a whole bunch of
other functions which are inside #ifndef NSCGI (or #ifdef NSCORE).
Those functions bring in yet other functions and some of *those* live
in other files. There are no functions anywhere that reside in the
base/ directory which have to be linked to the cgi's no matter how far
down the rabbithole you go, but it's a bit of a mess, really, and
with the recent improbable-but-possible coredump issue in Nagios core
I was forced to take a short hiatus from cgi issues and jump on that
one instead.
Anyways; It's unlikely manageable to fix it the proper way. If you
beat me to a hack that just iterates over the string elements inside
register_*group(), I think I'll just take that patch instead and put
a big fat "FIXME this is fugly and should use <solutionX> instead".
--
Andreas Ericsson andreas.ericsson at op5.se
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.
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612
More information about the Developers
mailing list