[mrtg] Cisco Interface Description - Old Story....

Sandu Mihai mihai at romania.eu.net
Mon Oct 2 11:49:04 MEST 2000


Here is the message I've posted on mrtg list.
 It will help you, pointing the exact location
in which you can modify mrtg. An also the OID that
will give you a table of correspondence between Cisco
interface description and corresponding interface index.

Have fun.

	Sandu Mihai - KPNQwest Romania Network Engineer

From: "Sandu Mihai" <mihai at romania.eu.net>
Subject: [mrtg] Interface index independence using interface description on
Cis
Date: Fri, 22 Sep 2000 18:35:06 +0200


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