[mrtg] Interface index independence using interface description on Cisco...
Sandu Mihai
mihai at romania.eu.net
Fri Sep 22 18:35:06 MEST 2000
Quoting from mrtg (v. 2.9.0preXX) in MRTG_lib.pm:
sub populateconfcache ($$$) {
my $confcache = shift;
my $host = shift;
my $reread = shift;
return if defined $$confcache{$host} and not $reread;
# clear confcache for host;
$$confcache{$host} = undef;
$$confcache{'...UPDATED'} = 1;
my @ret = snmpwalk($host, "ifDescr");
^^^^^^^^
| VERY BIG MISTAKE (at least on Cisco)!
foreach my $ret (@ret)
Well, now. On Cisco, you might use a description in your config file. You
can find it at:
.1.3.6.1.4.1.9.2.2.1.1.28
A snmpwalk .1.3.6.1.4.1.9.2.2.1.1.28 will give something like:
.1.3.6.1.4.1.9.2.2.1.1.28.X = "your description for this interface"
So, matching your string, you'll find the interface index. But. ifDescr
seems to return the 'common' name of the
interface ('Ethernet0', 'FastEthernet1/0' and so on...). Which is quite
annoying. I'll make a quick hack for that (an option or something.)
All my best,
Sandu Mihai - KPNQwest Romania Network Engineer
--
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
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list