[mrtg] Re: IP Address brand router querying

Andrew awd at awd.aust.to
Thu Jun 15 15:47:22 MEST 2000


----- Original Message -----
Sent: Thursday, June 15, 2000 9:54 PM
Subject: [mrtg] IP Address brand router querying


> I have an IP address list of 600 routers I monitor between two mrtg
systems.  Is there any way to use mrtg to figure out what the brand of
> each router for which I have an address is?  I know I have a mix of Bay
Networks, IBM, Cisco, 3Com, and many others.  I would like to run a script
that queries the router at ip address x and writes the brand and possibly
model into a text file.  Is there any utility out there to do this?  Help!
I don't want to have to telnet into each router just to figure out what it
is!
>
the easiest way would be to run a perl script and snmpwalk ;)

heres a quick and dirty way
--snip--
#!/usr/bin/perl -w
# get Brandnames

open ( IPLI, "/dir/to/file/of/ips");
@IPLIST = <IPLI>;
close IPLI;
$num=0;
foreach  $item(@IPLIST) {
$command = `/usr/bin/snmpwalk $item public system.sysDescr.0 `;

print "$item $command \n" ;
}
--snip--
the snmpwalk may require a -v and the paths need changing ;)
run the script with a > /file to save results to
HTH
cya
Andrew


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org



More information about the mrtg mailing list