tcaiazza
2011-12-06 21:25:11 UTC
tcaiazza [http://community.zenoss.org/people/tcaiazza] created the discussion
"New device modeler plugin not loading into zenmodeler"
To view the discussion, visit: http://community.zenoss.org/message/63111#63111
--------------------------------------------------------------
I'm trying to write a modeler plugin for some devices to grab the serial number, I've setup some devices with the modeler plugins and they worked just fine. However, one plugin just won't work even though the only difference with the broken modeler and the working ones is a different OID for the serial number
When I try to run the modeler manually, zenmodel says its only using the following 4 plugins
2011-12-06 15:47:50,154 DEBUG zen.ZenModeler: Using zenoss.snmp.NewDeviceMap on dist1-shcpa0915
2011-12-06 15:47:50,154 DEBUG zen.ZenModeler: Using zenoss.snmp.DeviceMap on dist1-shcpa0915
2011-12-06 15:47:50,155 DEBUG zen.ZenModeler: Using zenoss.snmp.InterfaceMap on dist1-shcpa0915
2011-12-06 15:47:50,155 DEBUG zen.ZenModeler: Using zenoss.snmp.RouteMap on dist1-shcpa0915
There should be one more from my zenoss.snmp.TestPluginMap. The plugin is set under the device. When I run zenhub in debug mode I see the following in the log.
2011-12-06 15:47:50,111 DEBUG zen.ModelerService: checking plugin zenoss.snmp.NewDeviceMap for device tester1
2011-12-06 15:47:50,111 DEBUG zen.ModelerService: adding plugin zenoss.snmp.NewDeviceMap for device tester1
2011-12-06 15:47:50,114 DEBUG zen.DbConnectionPool: Retrieved a connection; Pool size: 0
2011-12-06 15:47:50,114 DEBUG zen.DbConnectionPool: Returned a connection; Pool size: 1
2011-12-06 15:47:50,114 DEBUG zen.ModelerService: checking plugin zenoss.snmp.DeviceMap for device tester1
2011-12-06 15:47:50,114 DEBUG zen.ModelerService: adding plugin zenoss.snmp.DeviceMap for device tester1
2011-12-06 15:47:50,117 DEBUG zen.DbConnectionPool: Retrieved a connection; Pool size: 0
2011-12-06 15:47:50,117 DEBUG zen.DbConnectionPool: Returned a connection; Pool size: 1
2011-12-06 15:47:50,118 DEBUG zen.ModelerService: checking plugin zenoss.snmp.InterfaceMap for device tester1
2011-12-06 15:47:50,118 DEBUG zen.ModelerService: adding plugin zenoss.snmp.InterfaceMap for device tester1
2011-12-06 15:47:50,120 DEBUG zen.DbConnectionPool: Retrieved a connection; Pool size: 0
2011-12-06 15:47:50,121 DEBUG zen.DbConnectionPool: Returned a connection; Pool size: 1
2011-12-06 15:47:50,121 DEBUG zen.ModelerService: checking plugin zenoss.snmp.RouteMap for device tester1
2011-12-06 15:47:50,121 DEBUG zen.ModelerService: adding plugin zenoss.snmp.RouteMap for device tester1
2011-12-06 15:47:50,124 DEBUG zen.DbConnectionPool: Retrieved a connection; Pool size: 0
2011-12-06 15:47:50,124 DEBUG zen.DbConnectionPool: Returned a connection; Pool size: 1
2011-12-06 15:47:50,124 DEBUG zen.ModelerService: checking plugin zenoss.snmp.TestPluginMap for device tester1
But then nothing. It seems something is getting hung up in zenhub which prevents zenmodeler from loading my TestPlugin.Â
Anyone have any issues like this before?
Here is the actual code for ~/Products/DataCollector/plugins/zenoss/snmp/TestPluginMap.py
from CollectorPlugin import SnmpPlugin, GetMap
class TestPluginMap(SnmpPlugin):
   maptype = "TestPluginDeviceMap"
   snmpGetMap = GetMap({
            '.1.3.6.1.2.1.47.1.1.1.1.11.1' : 'setHWSerialNumber',
            })                                         Â
   def condition(self, device, log):
       """does device meet the proper conditions for this collector to run"""
       return device.snmpOid and device.snmpOid.startswith('1.3.6.1.2.1.47.1.1.1.1.11')
   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
       return self.objectMap(getdata)

--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/63111#63111]
Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
"New device modeler plugin not loading into zenmodeler"
To view the discussion, visit: http://community.zenoss.org/message/63111#63111
--------------------------------------------------------------
I'm trying to write a modeler plugin for some devices to grab the serial number, I've setup some devices with the modeler plugins and they worked just fine. However, one plugin just won't work even though the only difference with the broken modeler and the working ones is a different OID for the serial number
When I try to run the modeler manually, zenmodel says its only using the following 4 plugins
2011-12-06 15:47:50,154 DEBUG zen.ZenModeler: Using zenoss.snmp.NewDeviceMap on dist1-shcpa0915
2011-12-06 15:47:50,154 DEBUG zen.ZenModeler: Using zenoss.snmp.DeviceMap on dist1-shcpa0915
2011-12-06 15:47:50,155 DEBUG zen.ZenModeler: Using zenoss.snmp.InterfaceMap on dist1-shcpa0915
2011-12-06 15:47:50,155 DEBUG zen.ZenModeler: Using zenoss.snmp.RouteMap on dist1-shcpa0915
There should be one more from my zenoss.snmp.TestPluginMap. The plugin is set under the device. When I run zenhub in debug mode I see the following in the log.
2011-12-06 15:47:50,111 DEBUG zen.ModelerService: checking plugin zenoss.snmp.NewDeviceMap for device tester1
2011-12-06 15:47:50,111 DEBUG zen.ModelerService: adding plugin zenoss.snmp.NewDeviceMap for device tester1
2011-12-06 15:47:50,114 DEBUG zen.DbConnectionPool: Retrieved a connection; Pool size: 0
2011-12-06 15:47:50,114 DEBUG zen.DbConnectionPool: Returned a connection; Pool size: 1
2011-12-06 15:47:50,114 DEBUG zen.ModelerService: checking plugin zenoss.snmp.DeviceMap for device tester1
2011-12-06 15:47:50,114 DEBUG zen.ModelerService: adding plugin zenoss.snmp.DeviceMap for device tester1
2011-12-06 15:47:50,117 DEBUG zen.DbConnectionPool: Retrieved a connection; Pool size: 0
2011-12-06 15:47:50,117 DEBUG zen.DbConnectionPool: Returned a connection; Pool size: 1
2011-12-06 15:47:50,118 DEBUG zen.ModelerService: checking plugin zenoss.snmp.InterfaceMap for device tester1
2011-12-06 15:47:50,118 DEBUG zen.ModelerService: adding plugin zenoss.snmp.InterfaceMap for device tester1
2011-12-06 15:47:50,120 DEBUG zen.DbConnectionPool: Retrieved a connection; Pool size: 0
2011-12-06 15:47:50,121 DEBUG zen.DbConnectionPool: Returned a connection; Pool size: 1
2011-12-06 15:47:50,121 DEBUG zen.ModelerService: checking plugin zenoss.snmp.RouteMap for device tester1
2011-12-06 15:47:50,121 DEBUG zen.ModelerService: adding plugin zenoss.snmp.RouteMap for device tester1
2011-12-06 15:47:50,124 DEBUG zen.DbConnectionPool: Retrieved a connection; Pool size: 0
2011-12-06 15:47:50,124 DEBUG zen.DbConnectionPool: Returned a connection; Pool size: 1
2011-12-06 15:47:50,124 DEBUG zen.ModelerService: checking plugin zenoss.snmp.TestPluginMap for device tester1
But then nothing. It seems something is getting hung up in zenhub which prevents zenmodeler from loading my TestPlugin.Â
Anyone have any issues like this before?
Here is the actual code for ~/Products/DataCollector/plugins/zenoss/snmp/TestPluginMap.py
from CollectorPlugin import SnmpPlugin, GetMap
class TestPluginMap(SnmpPlugin):
   maptype = "TestPluginDeviceMap"
   snmpGetMap = GetMap({
            '.1.3.6.1.2.1.47.1.1.1.1.11.1' : 'setHWSerialNumber',
            })                                         Â
   def condition(self, device, log):
       """does device meet the proper conditions for this collector to run"""
       return device.snmpOid and device.snmpOid.startswith('1.3.6.1.2.1.47.1.1.1.1.11')
   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
       return self.objectMap(getdata)

--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/63111#63111]
Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]