Mailing List Archive

Run secondary login / collection script for entries in router.db? Anyone doing something like this?
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.

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.

Thanks!

-Aaron
Re: Run secondary login / collection script for entries in router.db? Anyone doing something like this? [ In reply to ]
Probably easier to do it the other way around - collect it all in one
big swoop. The extra stuff is all done as comments anyway. And
postprocess those collected files into a second directory/file/repo
for the just-config parts.
On Tue, 2 Oct 2018 at 19:15, Ni Ne <nineoften@hotmail.com> wrote:
>
> 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.
>
> 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.
>
> Thanks!
>
> -Aaron
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Run secondary login / collection script for entries in router.db? Anyone doing something like this? [ In reply to ]
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.

group1/router.db: host.name.co;cisco;up

group2/router.db: host.name.co;cisco-expanded;up

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.
>
> Thanks!
>
> -Aaron

> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Run secondary login / collection script for entries in router.db? Anyone doing something like this? [ In reply to ]
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.
weylin

?On 10/6/18, 11:34 AM, "heasley" <heas@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.

group1/router.db: host.name.co;cisco;up

group2/router.db: host.name.co;cisco-expanded;up

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.
>
> Thanks!
>
> -Aaron

> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss




_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss