On 29. feb. 2012 09:02, Morten Brekkevold wrote:
On Fri, 24 Feb 2012 07:04:22 +0100 Sigurd Myttingsigurd@mytting.no wrote:
Hi!
We´re looking into using rancid (http://www.shrubbery.net/rancid/) for keeping track of device configuration. I´d like to use the NAV database to build the rancid configuration. Currently I use dump.py, but I need more of the internal NAV data per device, most importantly I need to know the device vendor - cisco, juniper, alteon and so on.
Is there an easy way to get a more complete dump of the NAV database?
Not too easy unless you're comfortable with either SQL or Python/Django.
I've attached a patch that shows how to add the device vendor to the netbox output of dump.py. Although the resulting file may cover your needs, it can no longer be used for bulk imports in Seed DB.
Your patch worked well until I bulk added some boxes and one of them was offline and without a vendor in the database. Not really a big deal since I just as easy could dump what I needed by using SQL.
I currently dump about 1200 devices from NAV every hour and build a rancid configuration for backing up their configuration. Suddenly I have version management and backup of all my Cisco, Juniper and BigIP-devices. Sweet! I believe adding rancid to the NAV-package in the same manner as Cricket would be a huge value add for most NAVers.
Cheers and keep up the good work!
-Sigurd