[rancid] [PATCH] junos.pm: filter negative temperatures in ShowChassisEnvironment

Emille Blanc emille at abccommunications.com
Wed Feb 20 16:54:39 UTC 2019


Ironically, we rely on RANCID to tell us when our cabinets get too cold on such devices.
Mostly because our NMS is hopeless, and can't do it (Enterprise! Closed source!), so it never occurred to me to submit a patch for this.

However, some devices (namely, EX2200's) don't understand zero, or sub-zero degrees and report it as N/A.
I've attached a patch to cover this circumstance.

  # Class Item                           Status
  # Power FPC 0 Power Supply 0           OK        
  # Temp  FPC 0 GEPHY1                   OK        
- #       FPC 0 GEPHY2                   OK         N/A
+ #       FPC 0 GEPHY2                   OK        
  #       FPC 0 GEPHY3                   OK        
  #       FPC 0 GEPHY4                   OK        
  # 

-----Original Message-----
From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Anderson, Charles R
Sent: Tuesday, February 19, 2019 6:50 AM
To: rancid-discuss at shrubbery.net
Subject: [rancid] [PATCH] junos.pm: filter negative temperatures in ShowChassisEnvironment

One of our switches is in an outdoor cabinet.  It gets below 0 sometimes so we see output like this:

  # Temp  FPC 0 GEPHY1                   OK
  #       FPC 0 GEPHY2                   OK
  #       FPC 0 GEPHY3                   OK
- #       FPC 0 GEPHY4                   OK         -5 degrees C / 23 degrees F
+ #       FPC 0 GEPHY4                   OK
  #

The attached patch fixes ShowChassisEnvironment so it matches the - sign.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: junos.pm.na.patch
Type: application/octet-stream
Size: 594 bytes
Desc: junos.pm.na.patch
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20190220/bd6ace06/attachment.obj>


More information about the Rancid-discuss mailing list