Discussion:
[rancid] RANCID as an Element of a CMDB System
Traiano Welcome
2008-09-19 08:39:13 UTC
Permalink
Hi All

We've recently been tasked with putting together a CMDB system, and one aspect of this system is the storage (and further analysis) of router configurations. Currently, this is handled in the following way:

1. A rancid instance pulls router configs into the usual "config" directory, resulting in a collection of ,v files.
2. A "cmdb agent script" regularly polls the directory and extracts all new configs and changed router configs into a MySQL database schema. at this point the router configs are considered to be within the CMDB proper.
3. Staff with access to a php web interface can view the physical elements of routers (chassis, Slots, PSU, Processor, Feature Cards etc ...) and their serial and part numbers and thus conduct Asset Tracking and Stores Management.

At this point, the system is functional, but a major problem I forsee is keeping the database schema up to date so that when new router models appear with new hardware element fields and formats I would have to modify the schema and some back-end import code to cater for new fields.
Ideally, what I want is a pre-canned sql schema for each model router config (or a single generic one!) which would allow me to easily import a router config into a database.

Does such a thing exist? Alternatively, is there a RANCID variant out there which already imports router configs to SQL databases?

Thanks in Advance,
Traiano
Oliver Gorwits
2008-09-19 13:46:41 UTC
Permalink
Hi Traiano,

Traiano Welcome wrote:
| what I want is a pre-canned sql schema for each
| model router config (or a single generic one!) which would allow me
| to easily import a router config into a database.

If you were using SNMP, you could poll the ENTITY-MIB on the network
devices. This would reveal their hardware configuration, and it uses a
standardized language as described in section 3 of RFC 2737.

Some systems such as Netdisco will do this, and insert it into an SQL
database. The database schema is quite simple; the RFC uses a strict
hierachical model for the physical entities.

You could look at the Netdisco or SNMP::Info code for some ideas,
perhaps, and translate them for your RANCID-based system.

regards,
oliver.
- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
Traiano Welcome
2008-09-22 08:47:09 UTC
Permalink
Hi Oliver

I've gone some way towards building the router schema based on ENTITY-MIB and others (quite labour intensive :-)). Netdisco seems to overlap a lot of what I've done, and offer a number of better features, so it might be worth looking at integrating it into the CMDB system I'm trying to build, as opposed to the custom stuff I've scripted.

Many Thanks!
Traiano


-----Original Message-----
From: rancid-discuss-***@shrubbery.net on behalf of Oliver Gorwits
Sent: Fri 9/19/2008 3:46 PM
To: rancid-***@shrubbery.net
Subject: [rancid] Re: RANCID as an Element of a CMDB System

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Traiano,

Traiano Welcome wrote:
| what I want is a pre-canned sql schema for each
| model router config (or a single generic one!) which would allow me
| to easily import a router config into a database.

If you were using SNMP, you could poll the ENTITY-MIB on the network
devices. This would reveal their hardware configuration, and it uses a
standardized language as described in section 3 of RFC 2737.

Some systems such as Netdisco will do this, and insert it into an SQL
database. The database schema is quite simple; the RFC uses a strict
hierachical model for the physical entities.

You could look at the Netdisco or SNMP::Info code for some ideas,
perhaps, and translate them for your RANCID-based system.

regards,
oliver.
- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
Lance Vermilion
2008-09-22 16:47:50 UTC
Permalink
Traiano,

The biggest downfall to Netdisco is that it is not a simple install. I
think that is what has plagued the project. The UI could use a little
updating, but it gets the job done.
Post by Oliver Gorwits
Traiano,
The biggest downfall to Netdisco is that it is not a simple install. I
think that is what has plagued the project. The UI could use a little
updating, but it gets the job done.
Post by Traiano Welcome
Hi Oliver
I've gone some way towards building the router schema based on ENTITY-MIB
and others (quite labour intensive :-)). Netdisco seems to overlap a lot of
what I've done, and offer a number of better features, so it might be worth
looking at integrating it into the CMDB system I'm trying to build, as
opposed to the custom stuff I've scripted.
Many Thanks!
Traiano
-----Original Message-----
Sent: Fri 9/19/2008 3:46 PM
Subject: [rancid] Re: RANCID as an Element of a CMDB System
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Traiano,
| what I want is a pre-canned sql schema for each
| model router config (or a single generic one!) which would allow me
| to easily import a router config into a database.
If you were using SNMP, you could poll the ENTITY-MIB on the network
devices. This would reveal their hardware configuration, and it uses a
standardized language as described in section 3 of RFC 2737.
Some systems such as Netdisco will do this, and insert it into an SQL
database. The database schema is quite simple; the RFC uses a strict
hierachical model for the physical entities.
You could look at the Netdisco or SNMP::Info code for some ideas,
perhaps, and translate them for your RANCID-based system.
regards,
oliver.
- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFI061B2NPq7pwWBt4RAi52AJ93VHcMrSvg5JBCNTkW1H7Kbh2wDACfUVmu
h2KgL6cIfWtD7yfzw8x1rMI=
=7Yay
-----END PGP SIGNATURE-----
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Oliver Gorwits
2008-09-22 18:49:24 UTC
Permalink
Post by Lance Vermilion
The biggest downfall to Netdisco is that it is not a simple
install.
apt-get install netdisco-{frontend,backend}

anyway Lance, it's open source so you can always help by letting the
project developers know how they could simplify things for you :-)

- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
Lance Vermilion
2008-09-22 19:00:11 UTC
Permalink
Already talked to them about it. Unless i am going to offer up the
resources to do it, not likely.

apt-get install netdisco....great idea but not functional for any
redhat spinoff.

On Mon, Sep 22, 2008 at 11:49 AM, Oliver Gorwits
Post by Traiano Welcome
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Lance Vermilion
The biggest downfall to Netdisco is that it is not a simple
install.
apt-get install netdisco-{frontend,backend}
anyway Lance, it's open source so you can always help by letting the
project developers know how they could simplify things for you :-)
- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFI1+i02NPq7pwWBt4RAtppAJ9AxALjKY2z+BkGfHB0UjxJZmwnhQCg11sd
vLuEc5AFBW7oBS4AVR+GSiM=
=Mpd/
-----END PGP SIGNATURE-----
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Sam Munzani
2008-09-22 19:15:54 UTC
Permalink
+1

Not an easy deployment on FreeBSD either.

Sam
Post by Lance Vermilion
Already talked to them about it. Unless i am going to offer up the
resources to do it, not likely.
apt-get install netdisco....great idea but not functional for any
redhat spinoff.
On Mon, Sep 22, 2008 at 11:49 AM, Oliver Gorwits
Post by Traiano Welcome
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Lance Vermilion
The biggest downfall to Netdisco is that it is not a simple
install.
apt-get install netdisco-{frontend,backend}
anyway Lance, it's open source so you can always help by letting the
project developers know how they could simplify things for you :-)
- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFI1+i02NPq7pwWBt4RAtppAJ9AxALjKY2z+BkGfHB0UjxJZmwnhQCg11sd
vLuEc5AFBW7oBS4AVR+GSiM=
=Mpd/
-----END PGP SIGNATURE-----
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Jethro R Binks
2008-09-22 20:03:36 UTC
Permalink
Post by Sam Munzani
+1
Not an easy deployment on FreeBSD either.
"portinstall rancid"

?
Post by Sam Munzani
Sam
Post by Lance Vermilion
Already talked to them about it. Unless i am going to offer up the
resources to do it, not likely.
apt-get install netdisco....great idea but not functional for any
redhat spinoff.
On Mon, Sep 22, 2008 at 11:49 AM, Oliver Gorwits
Post by Traiano Welcome
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Lance Vermilion
The biggest downfall to Netdisco is that it is not a simple
install.
apt-get install netdisco-{frontend,backend}
anyway Lance, it's open source so you can always help by letting the
project developers know how they could simplify things for you :-)
- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFI1+i02NPq7pwWBt4RAtppAJ9AxALjKY2z+BkGfHB0UjxJZmwnhQCg11sd
vLuEc5AFBW7oBS4AVR+GSiM=
=Mpd/
-----END PGP SIGNATURE-----
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services
University Of Strathclyde, Glasgow, UK
Jethro R Binks
2008-09-22 20:12:43 UTC
Permalink
Post by Jethro R Binks
Post by Sam Munzani
+1
Not an easy deployment on FreeBSD either.
"portinstall rancid"
And indeed,

"portinstall netdisco"


. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services
University Of Strathclyde, Glasgow, UK
Post by Jethro R Binks
?
Post by Sam Munzani
Sam
Post by Lance Vermilion
Already talked to them about it. Unless i am going to offer up the
resources to do it, not likely.
apt-get install netdisco....great idea but not functional for any
redhat spinoff.
On Mon, Sep 22, 2008 at 11:49 AM, Oliver Gorwits
Post by Traiano Welcome
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Lance Vermilion
The biggest downfall to Netdisco is that it is not a simple
install.
apt-get install netdisco-{frontend,backend}
anyway Lance, it's open source so you can always help by letting the
project developers know how they could simplify things for you :-)
- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFI1+i02NPq7pwWBt4RAtppAJ9AxALjKY2z+BkGfHB0UjxJZmwnhQCg11sd
vLuEc5AFBW7oBS4AVR+GSiM=
=Mpd/
-----END PGP SIGNATURE-----
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services
University Of Strathclyde, Glasgow, UK
Buchan Milne
2008-09-23 06:46:13 UTC
Permalink
Post by Lance Vermilion
Already talked to them about it. Unless i am going to offer up the
resources to do it, not likely.
apt-get install netdisco....great idea but not functional for any
redhat spinoff.
Well, the real question isn't the tool you use, but whether Fedora/RH/Centos
have packaged all the bits ...

[***@tiger ~]$ urpmi netdisco
Running urpmi in restricted mode...
In order to satisfy the 'postgresql-server-virtual' dependency, one of the
following packages is needed:
1- postgresql8.3-server-8.3.4-1mdv2009.0.x86_64: The programs needed to
create and run a PostgreSQL server (to install)
2- postgresql8.2-server-8.2.9-3mdv2009.0.x86_64: The programs needed to
create and run a PostgreSQL server (to install)
What is your choice? (1-2) 1
To satisfy dependencies, the following packages are going to be installed:
Package Version Release Arch
(medium "Main")
apache-base 2.2.9 12mdv2009.0 x86_64
apache-mod_perl 2.0.4 2mdv2009.0 x86_64
apache-mod_php 5.2.6 3mdv2009.0 x86_64
apache-mod_ssl 2.2.9 12mdv2009.0 x86_64
apache-modules 2.2.9 12mdv2009.0 x86_64
apache-mpm-prefork 2.2.9 12mdv2009.0 x86_64
distcache-server 1.5.1 13mdv2009.0 x86_64
(suggested)
lib64distcache1 1.5.1 13mdv2009.0 x86_64
lib64ecpg8.3_6 8.3.4 1mdv2009.0 x86_64
lib64pq8.3_5 8.3.4 1mdv2009.0 x86_64
memcached 1.2.6 2mdv2009.0 x86_64
(suggested)
perl-Apache-Test 1.31 2.689836.1md> noarch
perl-BSD-Resource 1.29 2mdv2009.0 x86_64
perl-NetSNMP 5.4.2 2mdv2009.0 x86_64
php-ctype 5.2.6 17mdv2009.0 x86_64
php-dom 5.2.6 17mdv2009.0 x86_64
php-filter 5.2.6 17mdv2009.0 x86_64
php-ftp 5.2.6 17mdv2009.0 x86_64
php-gettext 5.2.6 17mdv2009.0 x86_64
php-hash 5.2.6 17mdv2009.0 x86_64
php-ini 5.2.6 2mdv2009.0 x86_64
php-json 5.2.6 17mdv2009.0 x86_64
php-openssl 5.2.6 17mdv2009.0 x86_64
php-posix 5.2.6 17mdv2009.0 x86_64
php-session 5.2.6 17mdv2009.0 x86_64
php-suhosin 0.9.27 1mdv2009.0 x86_64
php-sysvsem 5.2.6 17mdv2009.0 x86_64
php-sysvshm 5.2.6 17mdv2009.0 x86_64
php-tokenizer 5.2.6 17mdv2009.0 x86_64
php-xmlreader 5.2.6 17mdv2009.0 x86_64
php-xmlwriter 5.2.6 17mdv2009.0 x86_64
php-zlib 5.2.6 17mdv2009.0 x86_64
postgresql8.3 8.3.4 1mdv2009.0 x86_64
postgresql8.3-server 8.3.4 1mdv2009.0 x86_64
(medium "Main32")
ccp 0.4.1 1mdv2009.0 noarch
perl-IPC-Run 0.80 2mdv2009.0 noarch
(medium "Contrib")
apache-mod_apreq 2.08 15mdv2009.0 x86_64
lib64apreq2 2.08 15mdv2009.0 x86_64
mason 1.33 6mdv2008.1 noarch
netdisco 0.95 8mdv2009.0 noarch
perl-Apache-DBI 1.07 2mdv2009.0 noarch
perl-Apache-ProxyRewrite 0.17 7mdv2009.0 noarch
perl-Apache-Session 1.87 1mdv2009.0 noarch
perl-Apache-Session-Wrapper 0.33 3mdv2009.0 noarch
perl-Class-Container 0.12 5mdv2009.0 noarch
perl-Graph 0.84 1mdv2008.1 noarch
perl-GraphViz 2.03 3mdv2009.0 noarch
perl-MasonX-Request-ExtendedC> 0.03 4mdv2009.0 noarch
perl-MasonX-Request-ExtendedC> 0.03 4mdv2009.0 noarch
perl-MasonX-Request-WithApach> 0.31 2mdv2009.0 noarch
perl-SNMP-Info 2.00 1mdv2009.0 noarch
perl-libapreq2 2.08 15mdv2009.0 x86_64
93MB of additional disk space will be used.
17MB of packages will be retrieved.
Proceed with the installation of the 52 packages? (Y/n)
Traiano Welcome
2008-09-23 08:26:28 UTC
Permalink
Looking at the Netdisco web-page, they *really* are short-staffed!



-----Original Message-----
From: rancid-discuss-***@shrubbery.net on behalf of Lance Vermilion
Sent: Mon 9/22/2008 9:00 PM
To: Oliver Gorwits
Cc: rancid-***@shrubbery.net
Subject: [rancid] Re: RANCID as an Element of a CMDB System

Already talked to them about it. Unless i am going to offer up the
resources to do it, not likely.

apt-get install netdisco....great idea but not functional for any
redhat spinoff.

On Mon, Sep 22, 2008 at 11:49 AM, Oliver Gorwits
Post by Traiano Welcome
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Lance Vermilion
The biggest downfall to Netdisco is that it is not a simple
install.
apt-get install netdisco-{frontend,backend}
anyway Lance, it's open source so you can always help by letting the
project developers know how they could simplify things for you :-)
- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFI1+i02NPq7pwWBt4RAtppAJ9AxALjKY2z+BkGfHB0UjxJZmwnhQCg11sd
vLuEc5AFBW7oBS4AVR+GSiM=
=Mpd/
-----END PGP SIGNATURE-----
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Traiano Welcome
2008-09-23 08:22:15 UTC
Permalink
Hmmm. I wonder which apckage repositories have this (I'm using Ubuntu):

---
***@diameter:~/$ sudo apt-get install netdisco-backend

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package netdisco-backend

***@diameter:~/$ apt-cache search netdisco

netdiscover - active/passive address scanner using arp requests
---


-----Original Message-----
From: rancid-discuss-***@shrubbery.net on behalf of Oliver Gorwits
Sent: Mon 9/22/2008 8:49 PM
To: rancid-***@shrubbery.net
Subject: [rancid] Re: RANCID as an Element of a CMDB System

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Lance Vermilion
The biggest downfall to Netdisco is that it is not a simple
install.
apt-get install netdisco-{frontend,backend}

anyway Lance, it's open source so you can always help by letting the
project developers know how they could simplify things for you :-)

- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
Traiano Welcome
2008-09-23 08:19:41 UTC
Permalink
How easy would it be to use the database schema and backend code, possibly with a different UI, do you think?
Well, it's worth a try, it's one of those ymmv things :-)



-----Original Message-----
From: Lance Vermilion [mailto:***@gheek.net]
Sent: Mon 9/22/2008 6:47 PM
To: Traiano Welcome
Cc: Oliver Gorwits; rancid-***@shrubbery.net
Subject: Re: [rancid] Re: RANCID as an Element of a CMDB System

Traiano,

The biggest downfall to Netdisco is that it is not a simple install. I
think that is what has plagued the project. The UI could use a little
updating, but it gets the job done.
Post by Traiano Welcome
Hi Oliver
I've gone some way towards building the router schema based on ENTITY-MIB
and others (quite labour intensive :-)). Netdisco seems to overlap a lot of
what I've done, and offer a number of better features, so it might be worth
looking at integrating it into the CMDB system I'm trying to build, as
opposed to the custom stuff I've scripted.
Many Thanks!
Traiano
-----Original Message-----
Sent: Fri 9/19/2008 3:46 PM
Subject: [rancid] Re: RANCID as an Element of a CMDB System
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Traiano,
| what I want is a pre-canned sql schema for each
| model router config (or a single generic one!) which would allow me
| to easily import a router config into a database.
If you were using SNMP, you could poll the ENTITY-MIB on the network
devices. This would reveal their hardware configuration, and it uses a
standardized language as described in section 3 of RFC 2737.
Some systems such as Netdisco will do this, and insert it into an SQL
database. The database schema is quite simple; the RFC uses a strict
hierachical model for the physical entities.
You could look at the Netdisco or SNMP::Info code for some ideas,
perhaps, and translate them for your RANCID-based system.
regards,
oliver.
- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFI061B2NPq7pwWBt4RAi52AJ93VHcMrSvg5JBCNTkW1H7Kbh2wDACfUVmu
h2KgL6cIfWtD7yfzw8x1rMI=
=7Yay
-----END PGP SIGNATURE-----
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Lance Vermilion
2008-09-23 16:42:42 UTC
Permalink
Traniano,

I don't think it should be that hard. It will for sure take a little
bit of research to come up with a set of common commands between all
the systems that rancid supports. I would look at the commandtable and
then create a table for each vendor that way it can remain fairly
consistent and all your fields would match what you have in your
rancid file. You could create a table for each general command and
then just reference it via the nodeid. Different thoughts for sure one
is more relational while one is more flat. Anyway you layout the
database it is still going to be a result of what is captured from the
commandtable.

The above statement is the easy part, the not so fun part is changing
up rancid to use that database. Writting it isn't tough, it will be
getting it added to the distro so many can use all the hard work.
Post by Traiano Welcome
How easy would it be to use the database schema and backend code, possibly
with a different UI, do you think?
Well, it's worth a try, it's one of those ymmv things :-)
-----Original Message-----
Sent: Mon 9/22/2008 6:47 PM
To: Traiano Welcome
Subject: Re: [rancid] Re: RANCID as an Element of a CMDB System
Traiano,
The biggest downfall to Netdisco is that it is not a simple install. I
think that is what has plagued the project. The UI could use a little
updating, but it gets the job done.
Post by Traiano Welcome
Hi Oliver
I've gone some way towards building the router schema based on ENTITY-MIB
and others (quite labour intensive :-)). Netdisco seems to overlap a lot of
what I've done, and offer a number of better features, so it might be worth
looking at integrating it into the CMDB system I'm trying to build, as
opposed to the custom stuff I've scripted.
Many Thanks!
Traiano
-----Original Message-----
Sent: Fri 9/19/2008 3:46 PM
Subject: [rancid] Re: RANCID as an Element of a CMDB System
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Traiano,
| what I want is a pre-canned sql schema for each
| model router config (or a single generic one!) which would allow me
| to easily import a router config into a database.
If you were using SNMP, you could poll the ENTITY-MIB on the network
devices. This would reveal their hardware configuration, and it uses a
standardized language as described in section 3 of RFC 2737.
Some systems such as Netdisco will do this, and insert it into an SQL
database. The database schema is quite simple; the RFC uses a strict
hierachical model for the physical entities.
You could look at the Netdisco or SNMP::Info code for some ideas,
perhaps, and translate them for your RANCID-based system.
regards,
oliver.
- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFI061B2NPq7pwWBt4RAi52AJ93VHcMrSvg5JBCNTkW1H7Kbh2wDACfUVmu
h2KgL6cIfWtD7yfzw8x1rMI=
=7Yay
-----END PGP SIGNATURE-----
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Traiano Welcome
2008-09-24 17:54:00 UTC
Permalink
Lance

Quite true. Thanks for this advice, a number of those points are worth looking at. It suggests I should look at first creating a set of scripts to generate a schema (or an approximate schema) given standard configs from cisco/juniper, and then creating code generic enough to handle new schema adjustments.

Time to hit that drawing board :-)

Regards,
Traiano




________________________________

From: ***@gheek.net on behalf of Lance Vermilion
Sent: Tue 2008/09/23 06:42 PM
To: Traiano Welcome
Cc: Oliver Gorwits; rancid-***@shrubbery.net
Subject: Re: [rancid] Re: RANCID as an Element of a CMDB System



Traniano,

I don't think it should be that hard. It will for sure take a little
bit of research to come up with a set of common commands between all
the systems that rancid supports. I would look at the commandtable and
then create a table for each vendor that way it can remain fairly
consistent and all your fields would match what you have in your
rancid file. You could create a table for each general command and
then just reference it via the nodeid. Different thoughts for sure one
is more relational while one is more flat. Anyway you layout the
database it is still going to be a result of what is captured from the
commandtable.

The above statement is the easy part, the not so fun part is changing
up rancid to use that database. Writting it isn't tough, it will be
getting it added to the distro so many can use all the hard work.
Post by Traiano Welcome
How easy would it be to use the database schema and backend code, possibly
with a different UI, do you think?
Well, it's worth a try, it's one of those ymmv things :-)
-----Original Message-----
Sent: Mon 9/22/2008 6:47 PM
To: Traiano Welcome
Subject: Re: [rancid] Re: RANCID as an Element of a CMDB System
Traiano,
The biggest downfall to Netdisco is that it is not a simple install. I
think that is what has plagued the project. The UI could use a little
updating, but it gets the job done.
Post by Traiano Welcome
Hi Oliver
I've gone some way towards building the router schema based on ENTITY-MIB
and others (quite labour intensive :-)). Netdisco seems to overlap a lot of
what I've done, and offer a number of better features, so it might be worth
looking at integrating it into the CMDB system I'm trying to build, as
opposed to the custom stuff I've scripted.
Many Thanks!
Traiano
-----Original Message-----
Sent: Fri 9/19/2008 3:46 PM
Subject: [rancid] Re: RANCID as an Element of a CMDB System
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Traiano,
| what I want is a pre-canned sql schema for each
| model router config (or a single generic one!) which would allow me
| to easily import a router config into a database.
If you were using SNMP, you could poll the ENTITY-MIB on the network
devices. This would reveal their hardware configuration, and it uses a
standardized language as described in section 3 of RFC 2737.
Some systems such as Netdisco will do this, and insert it into an SQL
database. The database schema is quite simple; the RFC uses a strict
hierachical model for the physical entities.
You could look at the Netdisco or SNMP::Info code for some ideas,
perhaps, and translate them for your RANCID-based system.
regards,
oliver.
- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org <http://enigmail.mozdev.org/>
iD8DBQFI061B2NPq7pwWBt4RAi52AJ93VHcMrSvg5JBCNTkW1H7Kbh2wDACfUVmu
h2KgL6cIfWtD7yfzw8x1rMI=
=7Yay
-----END PGP SIGNATURE-----
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Lance Vermilion
2008-09-19 17:00:42 UTC
Permalink
Traiano,

There are commercial tools that do that (AlterPoint, Tripwire, etc).
For opensource the only thing I know of off hand is a config collector
for Cacti. It is very basic but it does work and it does store the
config in mysql.

As for Rancid doing what you want I don't think it would be all that
hard to simply import the configs then inject them into mysql. To keep
the mysql in sync with the rancid repo you could take good note of
what rancid looks for and create the proper fields and tables to hold
what you want. Rancid and grab what ever you want it to. Hell you can
even make it do an snmp query to get info you want.

-Lance
Post by Traiano Welcome
Hi All
We've recently been tasked with putting together a CMDB system, and one
aspect of this system is the storage (and further analysis) of router
1. A rancid instance pulls router configs into the usual "config" directory,
resulting in a collection of ,v files.
2. A "cmdb agent script" regularly polls the directory and extracts all new
configs and changed router configs into a MySQL database schema. at this
point the router configs are considered to be within the CMDB proper.
3. Staff with access to a php web interface can view the physical elements
of routers (chassis, Slots, PSU, Processor, Feature Cards etc ...) and their
serial and part numbers and thus conduct Asset Tracking and Stores
Management.
At this point, the system is functional, but a major problem I forsee is
keeping the database schema up to date so that when new router models appear
with new hardware element fields and formats I would have to modify the
schema and some back-end import code to cater for new fields.
Ideally, what I want is a pre-canned sql schema for each model router config
(or a single generic one!) which would allow me to easily import a router
config into a database.
Does such a thing exist? Alternatively, is there a RANCID variant out there
which already imports router configs to SQL databases?
Thanks in Advance,
Traiano
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Lance Vermilion
2008-09-19 17:17:29 UTC
Permalink
Well I guess I should have checked the update on ziptie. It is already there.

http://docs.ziptie.org/doku.php?id=dev:howto_postgresql
Post by Oliver Gorwits
Traiano,
There are commercial tools that do that (AlterPoint, Tripwire, etc).
For opensource the only thing I know of off hand is a config collector
for Cacti. It is very basic but it does work and it does store the
config in mysql.
As for Rancid doing what you want I don't think it would be all that
hard to simply import the configs then inject them into mysql. To keep
the mysql in sync with the rancid repo you could take good note of
what rancid looks for and create the proper fields and tables to hold
what you want. Rancid and grab what ever you want it to. Hell you can
even make it do an snmp query to get info you want.
-Lance
Post by Traiano Welcome
Hi All
We've recently been tasked with putting together a CMDB system, and one
aspect of this system is the storage (and further analysis) of router
1. A rancid instance pulls router configs into the usual "config" directory,
resulting in a collection of ,v files.
2. A "cmdb agent script" regularly polls the directory and extracts all new
configs and changed router configs into a MySQL database schema. at this
point the router configs are considered to be within the CMDB proper.
3. Staff with access to a php web interface can view the physical elements
of routers (chassis, Slots, PSU, Processor, Feature Cards etc ...) and their
serial and part numbers and thus conduct Asset Tracking and Stores
Management.
At this point, the system is functional, but a major problem I forsee is
keeping the database schema up to date so that when new router models appear
with new hardware element fields and formats I would have to modify the
schema and some back-end import code to cater for new fields.
Ideally, what I want is a pre-canned sql schema for each model router config
(or a single generic one!) which would allow me to easily import a router
config into a database.
Does such a thing exist? Alternatively, is there a RANCID variant out there
which already imports router configs to SQL databases?
Thanks in Advance,
Traiano
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Loading...