Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-4837

Inventory not loading when entPhysicalContainedIn is it's own grandparent

    XMLWordPrintable

Details

    • Vendor Bug
    • Resolution: Unresolved
    • Minor
    • None
    • Professional Edition
    • Discovery

    Description

      We found that some devices would not load the inventory page, the web interface would error out with a PHP memory exceed message.

      After looking at the table, we found some entries where entPhysicalContainedIn is its own grandparent. Removing the device and rerunning the discovery did not resolve it.

      +----------------+---------------+------------------+------------------------+------------------+-----------------+
      | entPhysical_id | inventory_mib | entPhysicalIndex | entPhysicalContainedIn | entPhysicalDescr | entPhysicalName |
      +----------------+---------------+------------------+------------------------+------------------+-----------------+
      |           2915 | NETAPP-MIB    |                1 |                      0 | N6240            | Chassis         |
      |           2916 | NETAPP-MIB    |                0 |                      1 | Disk Enclosure   | Disk Enclosure  |
      |           2917 | NETAPP-MIB    |              257 |                      0 | Power Supply 1   | Power Supply 1  |
      |           2918 | NETAPP-MIB    |              258 |                      0 | Power Supply 2   | Power Supply 2  |
      |           2919 | NETAPP-MIB    |              259 |                      0 | Power Supply 3   | Power Supply 3  |
      |           2920 | NETAPP-MIB    |              260 |                      0 | Power Supply 4   | Power Supply 4  |
      +----------------+---------------+------------------+------------------------+------------------+-----------------+
      

      As a workaround, we limited the max depth, which allowed the inventory page for those affected devices to load.

      Index: html/includes/print/inventory.inc.php
      ===================================================================
      --- html/includes/print/inventory.inc.php       (revision 13568)
      +++ html/includes/print/inventory.inc.php       (working copy)
      @@ -442,7 +442,7 @@
               echo($text);
       
               $count = dbFetchCell("SELECT COUNT(*) FROM `entPhysical` WHERE `device_id` = ? AND `entPhysicalContainedIn` = ?", [$device['device_id'], $ent['entPhysicalIndex']]);
      -        if ($count) {
      +        if ($count && $level < 4) {
                   echo("<ul>");
                   print_ent_physical($ent['entPhysicalIndex'], $level + 1, '');
                   echo("</ul>");
      

      Not sure what the fix should be -

      it could be in the discovery, MIB, device firmware bug, or logic in the inventory print code to break out if the entPhysicalContainedIn ID references a previously visited ID or is too deeply nested.

      Attachments

        Activity

          People

            landy Mike Stupalov
            matthew.petrson Matthew Peterson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: