Nagios 4: Registering object relationships in CGIs

Andreas Ericsson ae at op5.se
Mon Jan 7 17:09:40 CET 2013


On 01/07/2013 02:57 PM, Ton Voon wrote:
> Hi,
> 
> We're looking at the latest Nagios 4 branch and have seen an issue
> where the refactoring around object relationships seems to be missing
> for the CGIs. The specific problem is that the contactgroups do not
> have all the members populated, though I think host groups and other
> relationships are affected.
> 

I think this is already fixed in the svn trunk, and git agrees.

commit 4abf7d261e4c710277ddab01fd7b0ad77c1abe13
Author: Andreas Ericsson <ae at op5.se>
Date:   Wed Dec 5 15:29:04 2012 +0000

    xod: Make group member parsing work with precached objects
    
    This caused all manner of weird bugs, such as hostgroups being
    empty and notifications not being sent out to contacts added to
    contactgroups which in turn were set to be assigned to certain
    hosts and services, but only when using precached objects, which
    is how this slipped through the testing net.
    
    With this patch the objects.precache is identical to the
    objects.cache file generated from it after Nagios has parsed it,
    with two exceptions:
     * The date/time thing will obviously differ.
     * All lists are printed in reverse order in objects.cache
    
    The date thing I won't even bother commenting on. Just live with
    it. The reverse order thing might be a bit of an issue though,
    but since member lists aren't sorted in either file (and won't be
    if Nagios is started without using a precache file) anyway, I
    really don't care about that either.
    
    Signed-off-by: Andreas Ericsson <ae at op5.se>
    

-- 
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 Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412




More information about the Developers mailing list