[rancid] [PATCH] junos.pm: filter negative temperatures in ShowChassisEnvironment
"Anderson, Charles R" <[email protected]> Tue, 19 Feb 2019 14:49:45 +0000
| Newsgroups | gmane.network.rancid |
|---|---|
| Message-ID | <[email protected]> |
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. _______________________________________________ Rancid-discuss mailing list [email protected] http://www.shrubbery.net/mailman/listinfo/rancid-discuss
rancid-3.9-junos-negative-temperature.patch
(text/plain, 459 B)
--- junos.pm.negative-temp 2019-02-12 21:16:55.165617409 -0500
+++ junos.pm 2019-02-19 09:39:52.374354729 -0500
@@ -206,7 +206,7 @@
/ backplane temperature/ && next;
/(\s*Power supply.*), temperature/ &&
ProcessHistory("","","","# $1\n") && next;
- /(\s*.+) +\d+ degrees C.*$/ &&
+ /(\s*.+) +-?\d+ degrees C.*$/ &&
ProcessHistory("","","","# $1\n") && next;
/(^.*\S)\s+ Spinning at .*$/ &&
ProcessHistory("","","","# $1\n") && next;