[rancid] Best way to avoid regular diffs?
heasley
heas at shrubbery.net
Fri Jul 4 15:30:47 UTC 2014
Fri, Jul 04, 2014 at 09:44:35AM +0100, Dave Ewart:
> Hello,
>
> I've been getting repeated diffs in my Rancid reports because our
> switches use dynamic VLANs. Bascially, the output from 'show vlan' is
> constantly varying and there is no need to capture it: its results are
> simply noise, for our purposes.
>
> So I've been wondering about the *correct* way to prevent that output
> hitting the diffs.
>
> I've done the following:
>
> - Copied /usr/lib/rancid/bin/rancid to a new file named
> /usr/lib/rancid/bin/rancid-custom
>
> - Modified router.db so that it refers to 'cisco-custom' instead of
> 'cisco'
>
> - Modified /usr/lib/rancid/bin/rancid-fe to add an extra link from
> 'cisco-custom' to 'rancid-custom'
>
> - Then edit /usr/lib/rancid/bin/rancid-custom to remove the 'show vlan'
> output.
>
> This works and does what I want, so far so good.
>
> This seems like a robust solution, but because I've modified stock
> files, I'm going to miss out on any updates to the rancid installation
> that the Debian packages bring, next time there's an update.
>
> Is my approach reasonable or can you suggest a better, more robust
> approach?
move to rancid 3.1; copy the cisco definition from rancid.types.base to
rancid.types.conf, rename it, and remove or comment the commands you do
not want. so, no modification of stock, easier upgrades - i hope.
I believe 3.1 will also filter the vlan command anyway, if the vlan type
is dynamic (or whatever the value is).
More information about the Rancid-discuss
mailing list