[rancid] Run secondary login / collection script for entries in router.db? Anyone doing something like this?
Piegorsch, Weylin William
weylin at bu.edu
Sat Oct 6 20:41:58 UTC 2018
If you want for an administrator to only add a device once, you can create a cron job that periodically (every 5 min? Hourly? Daily?) duplicates the router.db file of one group into a router.db file of a secondary group, using sed or something to convert "cisco" (or whatever) into "cisco-secondary". This would have the benefit of both adding and deleting devices only in one location, since the cron job's function is to maintain the synchronicity.
On 10/6/18, 11:34 AM, "heasley" <heas at shrubbery.net> wrote:
Tue, Oct 02, 2018 at 06:15:20PM +0000, Ni Ne:
> I am curious to see the effort behind having the default configuration backup contain only the device configuration, and push other things like file system, interface status, inventory, etc, into a separate file. The main reason is I want to greatly increase the amount of ancillary data retrieved for each device, but don't want to clutter the configuration file itself, so disaster recovery is simpler.
my suggestion is that you do not alter the existing device types in rancid,
leave them as is and collect the additional information as separate device
types in a separate group to avoid the hostname collision.
define cisco-expanded in rancid.type.conf with your own perl module to
do whatever filtering/etc is needed. I think I wrote an example of
this in the FAQ or perhaps in rancid.types.conf(5).
> Is anyone doing this in a stream-lined fashion, where secondary login scripts are called for each device present in a router.db file? Ideally the administrator would only need to add a device once, and then based on vendor type that secondary login process would run transparently.
> I am still digging (back) into the RANCID internals to see how easy this would be to accomplish, so just curious if anyone is doing something like this already.
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
More information about the Rancid-discuss