[mrtg] portName - OID Help

Messineo, Chris CMessineo at espeed.com
Wed Nov 15 01:42:25 MET 2000


hey,

i found out that the OID for the portname you set on a switch (set port
name...) is:

enterprises.9.5.1.4.1.1.4.(module).(port)

now, im trying to get this included into my config files by configmaker
ive tried putting that OID into SNMP_util.pm, and into cfgmaker.
the problem is that i need to do like portName.2.9 for the name of port 2/9
if i put $$i{portName}.2.9, all i get in my config file is .2.9

how can i make it so for every port on the switch it puts the name?? i did
this so far, but i dont think it works (maybe someone can find my error...)

btw: this is found in the CISCO-STACK mib file

----
my ($port_num);
     $port_num = $$i{RName};
     $port_num =~ s/\//\./g;

                  $conf .= <<ECHO;
${c}
${c}Target[$name]: $ifref:$router  
ECHO          
             if (defined $$opt{subdirs}) {
                 $conf .= "${c}Directory[$name]: $$s{sysName}\n";
             }
             $conf .= <<ECHO;
${c}MaxBytes[$name]: $speed
${c}Title[$name]: $refdesc$refsimp -- $$i{portName}$$i{RName} --
$$i{CiscolocIfDescr}
----

any ideas?

thanks

--
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