[rancid] How to implement a diff filter?

heasley heas at shrubbery.net
Fri Feb 17 21:36:05 UTC 2012

Fri, Feb 17, 2012 at 08:37:29PM +0000, James Bensley:
> Hi Listee's,
> I have a problem which I'm sure is common, I wish to filter out some
> email updates from Rancid.
> Here are two very common examples for me of diff's that are emailed to
> me regularly, that I really don't need to know about :)
> [1] http://pastebin.com/raw.php?i=8KviGwAb
> [2] http://pastebin.com/raw.php?i=Ff38Gpvp
> What I would like is to understand the order in which the various
> parts of Rancid run when indexing Cisco devices, so that I can
> interrupt it.

control_rancid runs for each group
	rancid script
		execs login script
control_rancid diffs & checks in changes

you have to change the rancid script.

rancid-3.0 will have a manner to add/remove commands you do/dont want to run,
define your own device types, or add your own filters without altering the
base stuff.

> If we suppose updates happen as follows;
> [1] Connect to each device (one at a time) and execute the serious of
> enumerating commands preconfigured in the "@CommandTable"
> [2] Diff the current details with the last retrieved set, and if
> differences exist, commit as a new entry to the archive
> [3] After looping through all devices, email out the diff's for any
> devices who's archive revision has updated as a combined listing
> If that were how Rancid runs, I'd ideally like to insert a call to a
> script in section 3, which would parse the diff to my script. My
> script would look at a folder I have populated with diff's like those
> above, I don't want to be notified about, and not parse them onto to
> the final email that Rancid sends out when a match is found.
> Has anyone done this already perhaps? Ideally, I would like to
> understand more about this order of events, which scripts and binaries
> are performing which tasks, so I can implement such a feature for my
> self.
> Thanks all for reading and I appreciate any feed back any one can give.
> Cheers,
> -- 
> James.
> http://www.jamesbensley.co.cc/
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss

More information about the Rancid-discuss mailing list