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

Juniper MIB is no longer collecting temperature for FRUs

Details

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

    Description

      The discovery process for Juniper devices is no longer collecting temperature information for FRUs using the JUNIPER-MIB. Doing some research on my installed based which consists of SRX, MX, EX, PTX and ACX boxes I came up to the conclusion that only the following jnxFruType values should be accounted for temperature readings:

      • powerEntryModule
      • flexiblePicConcentrator
      • routingEngine
      • controlBoard

      Also, for optimization sake, only the indexes that have jnxFruState == online and jnxOperatingTemp != 0 should be discovered.

      To solve my alerting problem I created a small patch for our internal use since we really rely on those temperature readings for health checks. I've attached the patch on this ticket.

      I've used the *_ng variant of the discover function. I'm not sure it's supposed to be used a replacement for the previous one. Visually I've noticed an issue that has probably to do with the index field that's being set to 0. See the attached image for the trailing 0 (zero) at the end of the OID index.

      Attachments

        Activity

          [OBS-2972] Juniper MIB is no longer collecting temperature for FRUs

          Everything is working fine now, thanks!

          lbalbinot Luis Balbinot added a comment - Everything is working fine now, thanks!

          lbalbinot test with r9799.. seems as I'm a fool.. I forgot commit an change.

          landy Mike Stupalov added a comment - lbalbinot test with r9799.. seems as I'm a fool.. I forgot commit an change.
          lbalbinot Luis Balbinot added a comment - - edited

          Just did that and had no success after both tries.

          Anything related to oid_descr, oid_extra, etc, breaks it. It only works if it has a 'descr' element and no others.

          lbalbinot Luis Balbinot added a comment - - edited Just did that and had no success after both tries. Anything related to oid_descr, oid_extra, etc, breaks it. It only works if it has a 'descr' element and no others.
          landy Mike Stupalov added a comment - - edited

          interesting investigation..

          for your case just need add 'oid_extra' => ['jnxOperatingDescr']

          But can you test again 2 times (please revert your chages):
          1. after update to latest revision, just debug again, if sensors still missed:
          2. comment out line with 'descr_transform' => ['action' => 'entity_name'], and rediscover again

          landy Mike Stupalov added a comment - - edited interesting investigation.. for your case just need add 'oid_extra' => ['jnxOperatingDescr'] But can you test again 2 times (please revert your chages): 1. after update to latest revision, just debug again, if sensors still missed: 2. comment out line with 'descr_transform' => ['action' => 'entity_name'] , and rediscover again
          lbalbinot Luis Balbinot added a comment - - edited

          I'll send you the debug.

          I was playing around to try to debug as well and I suspect there's something to do with oid_descr and/or descr_transform in includes/definitions/mibs/juniper.inc.php. If I do this:

          $config['mibs'][$mib]['sensor'][] = array(
           'class' => 'temperature',
           *'descr' => '%jnxOperatingDescr%',*
           *#'oid_descr' => 'jnxOperatingDescr',*
           *#'descr_transform' => ['action' => 'entity_name'],*
           'oid' => 'jnxOperatingTemp',
           'oid_num' => '.1.3.6.1.4.1.2636.3.1.13.1.7',
           'min' => '0',
           'rename_rrd' => 'junos-%index%');
          

          I get the sensors to be discovered, but with the OID as the description. Isn't a dot missing there, maybe? (see image I've attached).

          lbalbinot Luis Balbinot added a comment - - edited I'll send you the debug. I was playing around to try to debug as well and I suspect there's something to do with oid_descr and/or descr_transform in includes/definitions/mibs/juniper.inc.php. If I do this: $config['mibs'][$mib]['sensor'][] = array( 'class' => 'temperature', *'descr' => '%jnxOperatingDescr%',* *#'oid_descr' => 'jnxOperatingDescr',* *#'descr_transform' => ['action' => 'entity_name'],* 'oid' => 'jnxOperatingTemp', 'oid_num' => '.1.3.6.1.4.1.2636.3.1.13.1.7', 'min' => '0', 'rename_rrd' => 'junos-%index%'); I get the sensors to be discovered, but with the OID as the description. Isn't a dot missing there, maybe? (see image I've attached).
          landy Mike Stupalov added a comment - - edited

          lbalbinot, still not found real trouble, please do another one debug (with -dd) on latest updated revision.

          P.S. Temporary ssh access to your dev install would help a lot.

          landy Mike Stupalov added a comment - - edited lbalbinot , still not found real trouble, please do another one debug (with -dd) on latest updated revision. P.S. Temporary ssh access to your dev install would help a lot.
          lbalbinot Luis Balbinot added a comment - - edited

          Sure, see new file called sensor_debug_dd.txt. I changed the device to another lab box with fewer interfaces, but everything else is the same. I'm on r9795.

          Nevermind the snmp info, it's a test box.

          lbalbinot Luis Balbinot added a comment - - edited Sure, see new file called sensor_debug_dd.txt. I changed the device to another lab box with fewer interfaces, but everything else is the same. I'm on r9795. Nevermind the snmp info, it's a test box.

          lbalbinot this is very strange mistake (I see sensors missed on your side, but on all my tests it's still there).
          You will be very helpful if you make a more detailed debug, by first update your svn tree:

          svn up
          ./discovery.php -u
          ./discovery.php -dd -m sensors -h <device>

          Please note, here will stored snmp auth information, do not attach this debug into issue, please sent to my mail: mike@observium.org

          landy Mike Stupalov added a comment - lbalbinot this is very strange mistake (I see sensors missed on your side, but on all my tests it's still there). You will be very helpful if you make a more detailed debug, by first update your svn tree: svn up ./discovery.php -u ./discovery.php -dd -m sensors -h <device> Please note, here will stored snmp auth information, do not attach this debug into issue, please sent to my mail: mike@observium.org
          lbalbinot Luis Balbinot added a comment - - edited

          Sure. I reverted it but it was then deleted by r9793. The output for "svn status" is empty. I've attached the debug output.

          lbalbinot Luis Balbinot added a comment - - edited Sure. I reverted it but it was then deleted by r9793. The output for "svn status" is empty. I've attached the debug output.

          This sensors discovery was moved to definitions, that why your patch is not needed.

          Really if your device not discover this sensors anymore, you can show discovery debug for test why not discover.

          By first update your install and rever your local changes:

          cd /opt/observium
          svn revert includes/discovery/sensors/juniper-mib.inc.php
          svn up
          

          Debug discovery:

          ./discovery.php -d -m sensors -h <device>
          

          Additionally show status of your local repository:

          svn status
          

          landy Mike Stupalov added a comment - This sensors discovery was moved to definitions, that why your patch is not needed. Really if your device not discover this sensors anymore, you can show discovery debug for test why not discover. By first update your install and rever your local changes: cd /opt/observium svn revert includes/discovery/sensors/juniper-mib.inc.php svn up Debug discovery: ./discovery.php -d -m sensors -h <device> Additionally show status of your local repository: svn status

          People

            landy Mike Stupalov
            lbalbinot Luis Balbinot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: