[Fwd: Patch to display parent hosts in extinfo.cgi]

Andreas Ericsson ae at op5.se
Wed May 13 19:13:37 CEST 2009


Ton Voon wrote:
> On 13 May 2009, at 15:25, matthias eble wrote:
> 
>> I'd place the logic into config.cgi. That would (if supplied with a
>> hostname or hostname+service_description argument) print a nice table
>> including links to parents, contacts, check_command, interval,...
>>
>> Of course, with the current data structures looking up children will  
>> be
>> painful in large installations.
> 
> I think you are over-estimating the pain. It's a single page for a  
> single host that is not refreshed. Iterating through all hosts once to  
> find children should be fine. If it was a page listing 100 hosts and  
> working out the children, then pain would increase a lot more.
> 
> A wise man once said - write it right, then optimise the hell out of  
> it later.
> 

Could be you're right. I just fear the 80k iterations with 0-100+ hash
lookups each for our largest customers, I guess.

Anyways; For bonus points, write it so that host objects have a list
of children attached to it in the CGI's, but make it so that this list
is never loaded for core Nagios. If it truly sucks for large networks,
I'll probably optimize it later.

--
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.

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com




More information about the Developers mailing list