Help : hostdependency cycle or not here?

Hiren Patel hir3npatel at gmail.com
Fri Aug 14 22:53:41 CEST 2009


nap wrote:
> Hi list,
> 
> I'm curently writing a new algo for hostdependency (and service) like
> for the circular host check. I wrote it, but I've got a different
> result than Nagios for this conf :
> host1<-host2, ... host9999 <- host10000, host10000<-host1 but no
> inherit on the last dependancy.
> 
> My algo say this is not a problem, because the last relation is
> without inherits (so we do not cycle), but Nagios is not OK with it.
> I'm wrong?
> 

looks like the current implementation recursively checks the 
dependencies regardless of whether they inherit their parents or not.
in my opinion this is the right behavior, even though the runtime may 
not recursively check dependents (depending on inheritance), defining 
circular dependencies in configs should be wrong.
if the others agree with this, it could be nice if the new algorithm 
checked for this, and still is faster than the current ;)

> You can test with the sample conf, untar the file in
> /usr/local/nagios/etc/ and add into the nagios.cfg :
> cfg_file=/usr/local/nagios/etc/host-10000.cfg
> cfg_file=/usr/local/nagios/etc/service-10000.cfg
> cfg_file=/usr/local/nagios/etc/host-dep-10000.cfg
> 
> If my algo is OK, it's quite fast for huge conf with a lot of inherits
> dependancies. If not, it's quite fast for find false results :p
> 
> Thanks,

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july




More information about the Developers mailing list