Patch (version 2.4.2):

Code:
r...@zenoss01:/usr/local/zenoss/zenoss/Products/DataCollector/plugins/zenoss/snmp#
 diff InterfaceMap.py.orig InterfaceMap.py
66,67c66,79
<     snmpGetTableMaps = baseSnmpGetTableMaps + (
<         # Extended interface information.
---
>     #snmpGetTableMaps = baseSnmpGetTableMaps + (
>     #    # Extended interface information.
>     #    GetTableMap('ifalias', '.1.3.6.1.2.1.31.1.1.1',
>     #            {'.6' : 'ifHCInOctets',
>     #             '.7' : 'ifHCInUcastPkts',
>     #             '.15': 'highSpeed',
>     #             '.18': 'description'}
>     #    ),
>     #)
>
>     #snmpGetTableMaps = baseSnmpGetTableMaps +  (
>     snmpGetTableMaps = (
>
>       # Extended interface information.
73a86,137
>
>         # If table
>         GetTableMap('iftable', '.1.3.6.1.2.1',
>                 {'.2.2.1.1': 'ifindex',
>                  '.2.2.1.2' : 'id',
>
>                  # -------------------------------------------------
>                  #           Added to get CatOS port name
>                  # --------------------------------------------------
>
>                  '.31.1.1.1.1': 'id',
>
>                  # --------------------------------------------------
>
>                  '.2.2.1.3': 'type',
>                  '.2.2.1.4': 'mtu',
>                  '.2.2.1.5': 'speed',
>                  '.2.2.1.6': 'macaddress',
>                  '.2.2.1.7': 'adminStatus',
>                  '.2.2.1.8': 'operStatus'}
>         ),
>         # ipAddrTable is the better way to get IP addresses
>         GetTableMap('ipAddrTable', '.1.3.6.1.2.1.4.20.1',
>                 {'.1': 'ipAddress',
>                  '.2': 'ifindex',
>                  '.3': 'netmask'}
>         ),
>         # Use the ipNetToMediaTable as a backup to the ipAddrTable
>         GetTableMap('ipNetToMediaTable', '.1.3.6.1.2.1.4.22.1',
>                 {'.1': 'ifindex',
>                  '.3': 'ipaddress',
>                  '.4': 'iptype'}
>         ),
>         # Interface Description
>         #GetTableMap('ifalias', '.1.3.6.1',
>         #        {'.2.1.31.1.1.1.18' : 'description',
>         #         '.2.1.31.1.1.1.15' : 'highSpeed'}
>         #),
>
>         # -------------------------------------------------
>         #           Added to get CatOS descriptions
>         # --------------------------------------------------
>
>         GetTableMap('ifCatOS', '.1.3.6.1.4.1.9.5.1.4.1.1',
>                 {'.11' : 'ifindex',
>                  '.1'  : 'ifmodule',
>                  '.2'  : 'ifport',
>                  '.4'  : 'description',
>                 }
>         ),
>
>         # --------------------------------------------------
75a140,141
>     #dontCollectInterfaceTypes = (1, 18, 76, 77, 81, 134)
>
95a162
>
104a172,205
>       # -------------------------------------------------
>         #           Added to get CatOS descriptions
>         # --------------------------------------------------
>
>         ifCatOS = tabledata.get("ifCatOS")
>
>
>         # --------------------------------------------------
>
>         # add interface alias (cisco description) to iftable
>         for ifidx, data in ifalias.items():
>             if not iftable.has_key(ifidx): continue
>             iftable[ifidx]['description'] = data.get('description', '')
>
>             # if we collect ifAlias name use it
>             # this is in the map subclass InterfaceAliasMap
>             id = data.get('id', None)
>             if id:
>                 iftable[ifidx]['id'] = id
>             iftable[ifidx]['description'] = data.get('description', '')
>
>             # --------------------------------------------------
>             #           Added to get CatOS descriptions
>             # --------------------------------------------------
>
>             if data.get('description', '') == '':
>                 if not ifCatOS: ifCatOS = {}
>                 if ifCatOS <> {}:
>                     for ifidx2, data2 in ifCatOS.items():
>                         if iftable[ifidx]['ifindex'] == 
> ifCatOS[ifidx2]['ifindex']:
>                             iftable[ifidx]['description'] = 
> data2.get('description', ' ')
>
>             # --------------------------------------------------
>






-------------------- m2f --------------------

Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=38291#38291

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to