[rancid] Excluding config lines in Rancid
Hughes, Doug
Douglas.Hughes at DEShawResearch.com
Wed Apr 23 15:05:11 UTC 2014
Sure, this topic is something of an FAQ.
* Edit the rancid executable (or whatever executable you happen to be using to collect the data)
* Most of the stuff for normal commands will be in the 'WriteTerm' callback (see CommandTable)
* There should already be an ntp clock-period match in there somewhere. In mine, it looks like this:
# Dog gone Cool matches to process the rest of the config
/^tftp-server flash / && next; # kill any tftp remains
/^ntp clock-period / && next; # kill ntp clock-period
/^ length / && next; # kill length on serial lines
/^ width / && next; # kill width on serial lines
* Next find the ShowEnv subroutine
o Look for 'next if' in the while (<INPUT>) loop. Add a line above or below that says: next if (/INTAKE/)
* Similarly for ShowFlash subroutine, add a next if (/bootflash/) if you don't want to see bootflash.
'next if' is the generic answer about how to eliminate things. Look in @commandtable to find the command that gets executed, that maps to a callback. Go to the callback and add a 'next if'.
From: rancid-discuss-bounces at shrubbery.net [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Vincent Aniello
Sent: Wednesday, April 23, 2014 10:50 AM
To: rancid-discuss at shrubbery.net
Subject: [rancid] Excluding config lines in Rancid
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
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?
I am currently running Rancid 3.0, but had the same issue in 2.3.6 and 2.3.8.
Thanks.
--Vincent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20140423/91db9dbc/attachment.html>
More information about the Rancid-discuss
mailing list