RANCID-CONTENT-TYPE Reporting...
Roderick B. Greening
Roderick.Greening at gt.ca
Wed Jun 15 05:29:40 UTC 2005
I probably should have been clearer... :)
What I really want is a report of ALL the header comments that RANCID puts
at the top of the file like Image, Processor, Serial, etc and dumped to a
csv one line per device or something similar. Basically a report that I can
either print or import into excel or something. It would be a useful report
that would allow me to verify warranty based on serial, and also report on
what hardware, firmware, os, etc is deployed.
I can manually do this today by selective grep for System Type, etc, but
it's a tedious manual process.
I was wondering if someone has already utilized some scripts to pull all
this detail out.
Thanks in advance to anyone who can provide a solution.
-----Original Message-----
From: john heasley
To: Roderick B. Greening
Cc: rancid-discuss at shrubbery.net
Sent: 14/06/2005 3:01 PM
Subject: Re: RANCID-CONTENT-TYPE Reporting...
Tue, Jun 14, 2005 at 05:14:29AM -0700, Roderick B. Greening:
> Has anyone written a script to extract the RANCID-CONTENT-TYPE values
> (comments) from the header of the config files to provide reporting on
the
> backed up inventory?
>
> I'd like to have a record in a single file that shows what devices I
have,
> versions of software, etc. I figure someone must have hacked together
> something to provide this.
>
> Thanks.
This ought to be a simple wrapper around grep. basically
cd ~rancid
. etc/rancid.conf
for group in $LIST_OF_GROUPS; do
( cd $group/configs
for device in *
egrep '(RANCID-CONTENT-TYPE| ...)' $device > $logfile
...
More information about the Rancid-discuss
mailing list