[rancid] Nexus 9K support in RANCiD 3.7

heasley heas at shrubbery.net
Fri Dec 29 20:36:21 UTC 2017


Fri, Dec 29, 2017 at 06:09:51PM +0000, Charles T. Brooks:
> We recently outfitted a new office with Cisco Nexus 9000s.  I monitor router and switch configuration changes enterprise-wide with custom built RPM packages of RANCiD on RHEL7 with git and gitweb.
> 
> The 9Ks have a constantly changing file date on a subfolder that can't be controlled:
> 
> - !Flash: logflash:       69632    Dec 29 01:37:09 2017  debug_logs/
> + !Flash: logflash:       69632    Dec 29 02:42:52 2017  debug_logs/
> 
> The following code patch to v7 prevents this from generating hourly commits and emails.
> 
> --- nxos.pm.in.orig     2017-12-29 13:02:01.347259970 -0500
> +++ nxos.pm.in  2017-12-29 13:03:39.336922201 -0500
> @@ -497,7 +497,7 @@ sub DirSlotN {
>         /\s+vtp_debug(_old)?\.log$/ && next;
> 
>         next if (/BufferMonitor-1HourData/);
> -       if (/ log\/$/) {
> +       if (/[_ ]logs?\/$/) {
>             # change
>             #         8192    Jan 08 14:05:05 2015  log/
>             # to
> 
> There's also a problem with a constantly fluctuating memory size value, but I haven't figured out how to fix that.
> 
> Thank you Heasley and co-conspirators for a great tool!
> 
> --Charlie

How about the following, so nothing is mistakingly caught.

Index: nxos.pm.in
===================================================================
--- nxos.pm.in	(revision 3754)
+++ nxos.pm.in	(working copy)
@@ -497,7 +497,8 @@
 	/\s+vtp_debug(_old)?\.log$/ && next;
 
 	next if (/BufferMonitor-1HourData/);
-	if (/ log\/$/) {
+
+	if (/( debug_logs| log)\/$/) {
 	    # change
 	    #         8192    Jan 08 14:05:05 2015  log/
 	    # to



More information about the Rancid-discuss mailing list