[rancid] How to implement a diff filter?

James Bensley jwbensley at gmail.com
Fri Feb 17 20:37:29 UTC 2012


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.
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/


More information about the Rancid-discuss mailing list