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?
Cheers,
-Sigurd
On Fri, 24 Feb 2012 07:04:22 +0100 Sigurd Mytting sigurd@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.
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
On Thu, 08 Mar 2012 21:42:47 +0100 Sigurd Mytting sigurd@mytting.no wrote:
On 29. feb. 2012 09:02, Morten Brekkevold wrote:
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 see.
Although you seem to get by using SQL, the patch can be fixed by replacing "box.type.vendor_id" with something like "box.type.vendor_id if box.type else ''" :-)
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.
We'll be looking into Rancid at UNINETT in the near future. We're holding a two-day NMS tool workshop for our customers in a couple of weeks, and we're asking Vidar Stokkenes to drop by to talk about Rancid on one of the days :)
Cheers and keep up the good work!
Thanks!