[mrtg] FW: MIB query (re HP/Nortel Blade switches )...

Steve Shipway s.shipway at auckland.ac.nz
Tue Feb 17 00:38:36 CET 2009

I would expect (hope) that the OID is the description
for interface index (instance).  

In this case, it would be relatively easy to write some code for an
interface template to cfgmaker to grab this OID (if available) and use it as
first preference.


I will try and modify the routers2 template posted in the library on
http://www.steveshipway.org/forum/ to achieve this, should be simple.

If you don't use routers2 then the coding will need to be a bit more complex


Untested attempt: hp-device.tp



my($hpoid) =

$hpdescr = snmpget($router_connect,$v3opt,$hpoid) if($hpoid);

$hpdescr = $if_description if(!$hpdescr); # in case nothing found

$target_lines = $default_target_directive."\n"

      ."Title[$target_name]: Traffic analysis for $hpdescr -- $sysname\n"

      ."SetEnv[$target_name]: MRTG_INT_IP=\"$if_ip\"




      ."routers.cgi*ShortDesc[$target_name]: $hpdescr\n";


Not having an HP switch I can't really test it properly of course.  This is
an interface template, hook in using --if-template and use cfgmaker from
MRTG 2.16 or better (else the $v3opt needs to be removed).  You might like
to change the MRTG_INT_DESCR or Title format.  See the cfgmaker
documentation or the MRTG book for more details on which variables are
available for use.


Please let me know if it works, and I'll add it to the library.





From: mrtg-bounces at lists.oetiker.ch [mailto:mrtg-bounces at lists.oetiker.ch]
On Behalf Of Hazell Derek
I finally found out the OID (see below) for the missing port descriptions
from the HP GbE2c blade switches from the support group for the blade switch
( <http://www.bladeconnect.com/modules.php?name=Forums&file=viewtopic&t=168>
However I am still not sure how to integrate the description data into the
target config file. (I think I was unable to see these OIDs / descriptions
earlier because snmpwalk was not running to completion when run against the
blade switch and instead was getting an error, and that therefore  cfgmaker
likewise gets an error when running against this target . and that that is
why the output config file for the target is empty of descriptions .).

So my question is, is it possible for cfgmaker to get the description data
below and build that data into the mrtg config file (without writing a fancy
script that will somehow insert the desctiption data into the config file
for the target.)


$ snmpwalk -v 1 -c public bs11.bm.syd

SNMPv2-SMI::enterprises. = STRING: "
description abc "

SNMPv2-SMI::enterprises. = STRING: "
description def "


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20090217/d9b50b38/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3133 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20090217/d9b50b38/attachment.bin 

More information about the mrtg mailing list