I have nothing useful to add, save saying I'd be extremely interested in
any HP Procurve monitoring stuff in a Zenpack.
--
James Pulver
Information Technology Area Supervisor
LEPP Computer Group
Cornell University
jshank wrote:
I am working on creating a custom modeler for our HP Switches. I used snmpwalk and
determined the proper OID's. Following CLuther's advice
(http://community.zenoss.com/forums/viewtopic.php?t=4760&highlight=&sid=e8fce371a435dba1163e91a56e84e442)
in other posts I created a new ZenPack and went into the modeler/plugins directory. I
copied the example from the DellDeviceMap.py and created my own HPDeviceMap.py file
that looks like this:
Code:
from Products.DataCollector.plugins.CollectorPlugin import SnmpPlugin, GetMap
class HPDeviceMap(SnmpPlugin):
"""Map mib elements from HP Switching mib to get hw and os products.
"""
maptype = "HPDeviceMAP"
snmpGetMap = GetMap({
#'.1.3.6.1.4.1.674.10892.1.300.10.1.8' : 'manufacturer',
'.1.3.6.1.4.1.11.2.3.7.11.9' : 'setHWProductKey',
'.1.3.6.1.4.1.11.2.36.1.1.2.9' : 'setHWSerialNumber',
'.1.3.6.1.4.1.11.2.36.1.1.2.8': 'setOSProductKey',
})
def process(self, device, results, log):
"""collect snmp information from this device"""
log.info('processing %s for device %s', self.name(), device.id)
getdata, tabledata = results
if getdata['setHWProductKey'] is None: return None
om = self.objectMap(getdata)
return om
I changed ZenPack Provides to /Manufacturers/HP and /Devices/Network/Switch
and tried remodeling the device. Nothing has changed. I did notice that in the
DellDevice ZenPack __init__.py there is alot more code than my blank generated
one:
Code:
...
def setupCollectorPlugins(self, dmd):
self.cleanupOldPlugins(dmd)
def addDellPlugins(obj):
if obj.hasProperty('zCollectorPlugins'):
newPlugins = []
for plugin in obj.zCollectorPlugins:
newPlugins.append(plugin)
if plugin == 'zenoss.snmp.DeviceMap':
newPlugins.append('DellDeviceMap')
elif plugin == 'zenoss.snmp.CpuMap':
newPlugins.append('DellCPUMap')
newPlugins.append('DellPCIMap')
obj.zCollectorPlugins = newPlugins
Do I need to replicate this or is this done automatically? What am I missing
here?
-------------------- m2f --------------------
Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=20627#20627
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users