Page 1 of 1

Unconfigured objects nesting problem (2012R1.0)

Posted: Sun Oct 21, 2012 2:57 pm
by nagiosadmin42
CentOS 6.3, Nagios XI 2012R1.0

The Unconfigured Objects table is sometimes messed up, I tracked it down to the "rowspan" logic in missingobjects.php that uses the incorrect number of services value due to hidden services. I simply replicated the logic that's in the service loop, and used it to re-calculate the $total_services value that's used for the rowspan. See lines 286 to 292:

Code: Select all

/usr/local/nagiosxi/html/admin/missingobjects.php;

    281                 $displayed++;
    282
    283                 if($current_host>0)
    284                         echo "<tr><td colspan='5'></td></tr>";
    285
    286                 // xxx recalculate the $total_services using the same logic as in the loop below
    287                 $total_services = 0;
    288                 foreach($svcs as $sn => $sarr){
    289                         if(service_exists($hn,$sn)==true || in_array($sn,$hidden))
    290                                 continue;
    291                         $total_services++;
    292                 }
    293
    294                 echo "<tr>";

Re: Unconfigured objects nesting problem (2012R1.0)

Posted: Mon Oct 22, 2012 1:53 pm
by scottwilkerson
Thanks. I made a slightly different modification to the Trunk of XI that should have the same affect.