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

SNR (DCN) switch stack improvemnents

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • None
    • Professional Edition
    • Discovery

    Description

      SNR switches (for example S29xx) can be stacked.

      $os = "snr-switch";

      current MIB:
      https://data.nag.wiki/SNR%20Switches/MIBs/SNR-SWITCH_private_2.1.147.mib

      need change to not discover CPU of master in stack:

      Index: includes/definitions/mibs/dcn/dcn-xxx.php
      ===================================================================
      --- includes/definitions/mibs/dcn/dcn-xxx.php	(revision 15432)
      +++ includes/definitions/mibs/dcn/dcn-xxx.php	(working copy)
      @@ -41,7 +41,8 @@
           'oid_descr' => 'switchCPUType',
           'oid'       => 'switchCpuUsage',
           //'oid_num'   => '.1.3.6.1.4.1.6339.100.1.11.3',
      -    'indexes'   => [ 0 => [ 'descr' => '%oid_descr%' ] ]
      +    'indexes'   => [ 0 => [ 'descr' => '%oid_descr%' ] ],
      +    'pre_test'      => [ 'oid' => $mib . '::sysStackFlag.0', 'operator' => 'ne', 'value' => "stack" ]
       ];
       
       /*
      

      Tables of supported OIDs:

        noStack stack
      sysHardwareVersion.0 only for master
      sysSoftwareVersion.0 only for master
      sysStackFlag.0 noStack(2) stack(1)
      sysPowerStateTable.sysPowerState.<index>
      sysPowerStateTable.sysPowerStatus.<index>
      sysPowerStateTable.sysPowerSupplyType.<index>
      sysSlotTable.sysCPUType.<index>
      sysSlotTable.sysCPUFiveMinuteIdle.<index>
      sysSlotTable.sysMemorySize.<index>
      sysSlotTable.sysMemoryBusy.<index>
      sysSlotTable.sysFlashSize.<index>
      sysSlotTable.sysTemperature.<index>
      sysSlotTable.sysCpuUsage.<index>
      sysSlotTable.sysMemoryUsage.<index>
      sysSlotTable.sysMemUsage.<index>
      sysSlotTable.sysFreeFlashSize.<index>
      sysSlotTable.sysMemorySizeInMB.<index>
      switchInfoTable.swModuleType.<index> internal vendor (DCN) model identifier
      switchInfo.switchCPUType.0 only for master
      switchInfo.switchCPUFiveMinuteIdle.0 only for master
      switchInfo.switchMemorySize.0 only for master
      switchInfo.switchMemoryBusy.0 only for master
      switchInfo.switchFlashSize.0 only for master
      switchInfo.switchTemperature.0 only for master
      switchInfo.switchCpuUsage.0 only for master
      switchInfo.switchMemoryUsage.0 only for master
      switchInfo.switchFlashOccupiedSize.0 only for master
      switchInfo.switchFlashFreeSize.0 only for master
      switchInfo.switchFlashSizeInBytes.0 only for master
      switchInfo.switchFlashOccupiedSizeInBytes.0 only for master
      switchInfo.switchFlashFreeSizeInBytes.0 only for master

      inventory for stack

      Is it possible to add all device chassis to inventory?
      now ther is always one in ENTITY-MIB::entPhysicalTable

      switchInfoTable
      SNR-SWITCH-MIB::swSlotIndex.1.0 = INTEGER: 1
      SNR-SWITCH-MIB::swSlotIndex.2.0 = INTEGER: 2
      SNR-SWITCH-MIB::swUnitIndex.1.0 = INTEGER: 0
      SNR-SWITCH-MIB::swUnitIndex.2.0 = INTEGER: 0
      SNR-SWITCH-MIB::swModuleType.1.0 = INTEGER: 460
      SNR-SWITCH-MIB:: .2.0 = INTEGER: 460

      The idea is only for stacked (SNR-SWITCH-MIB::sysStackFlag.0 = stack)

      1. get ENTITY-MIB::entPhysicalTable chassis
        1. real example: found one (entPhysicalClass = chassis) with entPhysicalDescr ="NAG LLC chassis model SNR-S2995G-24TX"
      2. get SNR-SWITCH-MIB::switchInfoTable
        1. real example: found two Slots (1.0 and 2.0) with swModuleType 460
          1. so we have really two chasisses with same model, can create manualy entry for all from switchInfoTable
            1. entPhysicalIndex get from first part switchInfoTable index (1.0 -> 1 ; 2.0 -> 2, ...)
            2. inventory_mib = SNR-SWICTH
            3. entPhysicalDescr same as chassis from entPhysicalTable IF have same swModuleType
            4. entPhysicalIsFRU same as chassis from entPhysicalTable IF have same swModuleType
            5. entPhysicalModelName same as chassis from entPhysicalTable IF have same swModuleType
            6. entPhysicalMfgName same as chassis from entPhysicalTable IF have same swModuleType
            7. entPhysicalAlias rewrite to swModuleType (empty in ENTITY-MIB::entPhysicalTable)
            8. entPhysicalContainedIn = 0
            9. entPhysicalParentRelPos = first part switchInfoTable index
            10. entPhysicalClass = chassis
            11. entPhysicalHardwareRev = N/a or NULL or empty
            12. entPhysicalFirmwareRev = N/a or NULL or empty
            13. entPhysicalSoftwareRev = N/a or NULL or empty
            14. entPhysicalAssetID = N/a or NULL or empty
            15. entPhysicalVendorType = N/a or NULL or empty
            16. entPhysicalSerialNum = N/a or NULL or empty

      when attach to inventory ports from SNR-SWITCH-MIB::priPortTable set entPhysicalContainedIn to correct chassis
      SNR-SWITCH-MIB::priPortTable.priPortEntry.portName.1 = STRING: "Ethernet1/0/1"

      1/0/x – is link to index from switchInfoTab

      Attachments

        Activity

          People

            landy Mike Stupalov
            mtivi Martyushev Tim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: