[rancid] Excluding config lines in Rancid

heasley heas at shrubbery.net
Thu Apr 24 21:13:19 UTC 2014


Wed, Apr 23, 2014 at 10:49:49AM -0400, Vincent Aniello:
> Rancid is detecting configuration changes on a few configuration items in 
> Cisco switch configurations that are automatically updated and Rancid 
> should exclude from it's comparisons.
> 
> On a Cisco Catalyst 3560 switch running software version 12.2(25)SEE4 
> Rancid is reporting changes to the "ntp clock-period" command:
> 
> - ntp clock-period 36029104
> + ntp clock-period 3602910

this be filtered by stock rancid 3.0.  i can not imagine why it would be
missed until the device were not configured as 'cisco'.

> On a Cisco Nexus 3548 switch running software version 6.0(2)A1(1e) Rancid 
> is reporting changes to the following configuration items:
> 
>   !Env:  INTAKE     45            29
> + !Env:  INTAKE     45            28
> 
> - !Flash: bootflash:     5356844    Apr 22 17:42:48 2014 
> BufferMonitor-1HourData
> + !Flash: bootflash:     5356844    Apr 22 20:42:48 2014 
> BufferMonitor-1HourData
> 
> Can Rancid be configured to ignore changes in these lines?

Index: bin/nxrancid.in
===================================================================
--- bin/nxrancid.in	(revision 2816)
+++ bin/nxrancid.in	(working copy)
@@ -313,6 +313,7 @@
 
 	s/ +$//;	# Drop trailing ' '
 	next if (/Fan Zone Speed:/);
+	next if (/INTAKE/);
 	ProcessHistory("COMMENTS","","","!Env: $_");
     }
     ProcessHistory("COMMENTS","","","!\n");
@@ -436,6 +437,8 @@
 	return(-1) if (/command authorization failed/i);
 	return(1) if /(Open device \S+ failed|Error opening \S+:)/;
 
+	next if (/BufferMonitor-1HourData/);
+
 	if (/^\s*(\d+) bytes /) {
 	    my($tmp) = int($1 / (1024 * 1024));
 	    s/$1 bytes /$tmp MB /;

lmk if I've misplaced the INTAKE filter.

> I am currently running Rancid 3.0, but had the same issue in 2.3.6 and 
> 2.3.8.


More information about the Rancid-discuss mailing list