Permalink
Browse files

Raytalk Wireless 3.0

git-svn-id: http://zenpacks.zenoss.org/svn/zenpacks@924 db08cffe-75b9-45d1-af1a-46ad9ef135f6
  • Loading branch information...
1 parent 34afc24 commit a56c0e4104777a24acc71dfc6bf78769d28f487c Matt Ray committed Aug 20, 2010
@@ -0,0 +1,38 @@
+###########################################################################
+#
+# This program is part of Zenoss Core, an open source monitoring platform.
+# Copyright (C) 2007, Zenoss Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 as published by
+# the Free Software Foundation.
+#
+# For complete information please visit: http://www.zenoss.com/oss/
+#
+###########################################################################
+
+from Products.DataCollector.plugins.CollectorPlugin import SnmpPlugin, GetMap
+
+class RaytalkCPEDeviceMap(SnmpPlugin):
+ """Map mib elements from Raytalk mib to get hw and os products.
+ """
+
+ maptype = "RaytalkCPEDeviceMap"
+
+ snmpGetMap = GetMap({
+ # 'Raytalk' : 'manufacturer',
+ # 'cpe2.4' : 'setHWProductKey',
+ # '.1.2.840.10036.1.1.1.1.0' : 'setHWSerialNumber',
+ # '.1.2.840.10036.3.1.2.1.4.0': '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
+
+
@@ -36,4 +36,3 @@ def process(self, device, results, log):
return om
-
@@ -2,10 +2,13 @@
<objects>
<!-- ('', 'zport', 'dmd', 'Devices', 'Network', 'rrdTemplates', 'Raytalk MHAN-Z') -->
<object id='/zport/dmd/Devices/Network/rrdTemplates/Raytalk MHAN-Z' module='Products.ZenModel.RRDTemplate' class='RRDTemplate'>
+<property type="string" id="targetPythonClass" mode="w" >
+Products.ZenModel.Device
+</property>
<tomanycont id='datasources'>
-<object id='RX Dropped packets' module='Products.ZenModel.BasicDataSource' class='BasicDataSource'>
+<object id='quality' module='Products.ZenModel.BasicDataSource' class='BasicDataSource'>
<property select_variable="sourcetypes" type="selection" id="sourcetype" mode="w" >
-SNMP
+COMMAND
</property>
<property type="boolean" id="enabled" mode="w" >
True
@@ -16,83 +19,20 @@ True
<property type="int" id="severity" mode="w" >
3
</property>
-<property type="int" id="cycletime" mode="w" >
-300
-</property>
-<property type="string" id="oid" mode="w" >
-1.3.6.1.4.1.8433.1.1.5.3.1.1.13.1
-</property>
-<property type="boolean" id="usessh" mode="w" >
-False
-</property>
-<tomanycont id='datapoints'>
-<object id='RX Dropped packets' module='Products.ZenModel.RRDDataPoint' class='RRDDataPoint'>
-<property select_variable="rrdtypes" type="selection" id="rrdtype" mode="w" >
-GAUGE
-</property>
-<property type="boolean" id="isrow" mode="w" >
-True
-</property>
-</object>
-</tomanycont>
-</object>
-<object id='RX packets' module='Products.ZenModel.BasicDataSource' class='BasicDataSource'>
-<property select_variable="sourcetypes" type="selection" id="sourcetype" mode="w" >
-SNMP
-</property>
-<property type="boolean" id="enabled" mode="w" >
-True
-</property>
-<property type="string" id="eventClass" mode="w" >
-/Cmd/Fail
-</property>
-<property type="int" id="severity" mode="w" >
-3
+<property type="string" id="commandTemplate" mode="w" >
+/usr/bin/snmpwalk -v1 -c${device/zSnmpCommunity} ${here/manageIp} 1.3.6.1.4.1.8433.1.1.2.11.1.2.1 | sed -e s/^SNMPv2-SMI::enterprises.8433.1.1.2.11.1.2.1// | grep -oE "[[:digit:]]{1,}" | sed -e 's/.*/quality:&amp;/'
</property>
<property type="int" id="cycletime" mode="w" >
300
</property>
-<property type="string" id="oid" mode="w" >
-1.3.6.1.4.1.8433.1.1.5.3.1.1.9.1
-</property>
<property type="boolean" id="usessh" mode="w" >
False
</property>
-<tomanycont id='datapoints'>
-<object id='Rx packets' module='Products.ZenModel.RRDDataPoint' class='RRDDataPoint'>
-<property select_variable="rrdtypes" type="selection" id="rrdtype" mode="w" >
-GAUGE
-</property>
-<property type="boolean" id="isrow" mode="w" >
-True
-</property>
-</object>
-</tomanycont>
-</object>
-<object id='TX Dropped packets' module='Products.ZenModel.BasicDataSource' class='BasicDataSource'>
-<property select_variable="sourcetypes" type="selection" id="sourcetype" mode="w" >
-SNMP
-</property>
-<property type="boolean" id="enabled" mode="w" >
-True
-</property>
-<property type="string" id="eventClass" mode="w" >
-/Cmd/Fail
-</property>
-<property type="int" id="severity" mode="w" >
-3
-</property>
-<property type="int" id="cycletime" mode="w" >
-300
-</property>
-<property type="string" id="oid" mode="w" >
-1.3.6.1.4.1.8433.1.1.5.3.1.1.12.1
-</property>
-<property type="boolean" id="usessh" mode="w" >
-False
+<property type="string" id="parser" mode="w" >
+Auto
</property>
<tomanycont id='datapoints'>
-<object id='Tx Dropped packets' module='Products.ZenModel.RRDDataPoint' class='RRDDataPoint'>
+<object id='quality' module='Products.ZenModel.RRDDataPoint' class='RRDDataPoint'>
<property select_variable="rrdtypes" type="selection" id="rrdtype" mode="w" >
GAUGE
</property>
@@ -102,7 +42,7 @@ True
</object>
</tomanycont>
</object>
-<object id='Tx packets' module='Products.ZenModel.BasicDataSource' class='BasicDataSource'>
+<object id='sysUpTime' module='Products.ZenModel.BasicDataSource' class='BasicDataSource'>
<property select_variable="sourcetypes" type="selection" id="sourcetype" mode="w" >
SNMP
</property>
@@ -119,46 +59,16 @@ True
300
</property>
<property type="string" id="oid" mode="w" >
-1.3.6.1.4.1.8433.1.1.5.3.1.1.8.1
+1.3.6.1.2.1.1.3.0
</property>
<property type="boolean" id="usessh" mode="w" >
False
</property>
-<tomanycont id='datapoints'>
-<object id='Tx packets' module='Products.ZenModel.RRDDataPoint' class='RRDDataPoint'>
-<property select_variable="rrdtypes" type="selection" id="rrdtype" mode="w" >
-GAUGE
-</property>
-<property type="boolean" id="isrow" mode="w" >
-True
-</property>
-</object>
-</tomanycont>
-</object>
-<object id='quality' module='Products.ZenModel.BasicDataSource' class='BasicDataSource'>
-<property select_variable="sourcetypes" type="selection" id="sourcetype" mode="w" >
-COMMAND
-</property>
-<property type="boolean" id="enabled" mode="w" >
-True
-</property>
-<property type="string" id="eventClass" mode="w" >
-/Cmd/Fail
-</property>
-<property type="int" id="severity" mode="w" >
-3
-</property>
-<property type="string" id="commandTemplate" mode="w" >
-/usr/bin/snmpwalk -v1 -c${device/zSnmpCommunity} ${here/manageIp} 1.3.6.1.4.1.8433.1.1.2.11.1.2.1 | sed -e s/^SNMPv2-SMI::enterprises.8433.1.1.2.11.1.2.1// | grep -oE "[[:digit:]]{1,}" | sed -e 's/.*/quality:&amp;/'
-</property>
-<property type="int" id="cycletime" mode="w" >
-300
-</property>
-<property type="boolean" id="usessh" mode="w" >
-False
+<property type="string" id="parser" mode="w" >
+Auto
</property>
<tomanycont id='datapoints'>
-<object id='quality' module='Products.ZenModel.RRDDataPoint' class='RRDDataPoint'>
+<object id='sysUpTime' module='Products.ZenModel.RRDDataPoint' class='RRDDataPoint'>
<property select_variable="rrdtypes" type="selection" id="rrdtype" mode="w" >
GAUGE
</property>
@@ -169,148 +79,29 @@ True
</tomanycont>
</object>
</tomanycont>
-<tomanycont id='graphDefs'>
-<object id='Statistiche Bridge' module='Products.ZenModel.GraphDefinition' class='GraphDefinition'>
-<property type="int" id="height" mode="w" >
-100
-</property>
-<property type="int" id="width" mode="w" >
-500
+<tomanycont id='thresholds'>
+<object id='Link quality low' module='Products.ZenModel.MinMaxThreshold' class='MinMaxThreshold'>
+<property label="DataPoints" type="lines" id="dsnames" mode="w" >
+['quality_quality']
</property>
-<property type="string" id="units" mode="w" >
-packets
-</property>
-<property type="boolean" id="log" mode="w" >
-False
-</property>
-<property type="boolean" id="base" mode="w" >
-False
-</property>
-<property type="int" id="miny" mode="w" >
--1
-</property>
-<property type="int" id="maxy" mode="w" >
--1
-</property>
-<property type="boolean" id="hasSummary" mode="w" >
+<property label="Enabled" type="boolean" id="enabled" mode="w" >
True
</property>
-<tomanycont id='graphPoints'>
-<object id='RX Dropped packets' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
-<property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
-LINE
-</property>
-<property type="long" id="lineWidth" mode="w" >
-1
-</property>
-<property type="boolean" id="stacked" mode="w" >
-False
-</property>
-<property type="string" id="format" mode="w" >
-%5.2lf%s
-</property>
-<property type="string" id="legend" mode="w" >
-${graphPoint/id}
-</property>
-<property type="long" id="limit" mode="w" >
--1
-</property>
-<property type="string" id="dpName" mode="w" >
-RX Dropped packets_RX Dropped packets
-</property>
-<property type="string" id="cFunc" mode="w" >
-AVERAGE
-</property>
-</object>
-<object id='Rx packets' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
-<property type="long" id="sequence" mode="w" >
-1
-</property>
-<property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
-LINE
-</property>
-<property type="long" id="lineWidth" mode="w" >
-1
-</property>
-<property type="boolean" id="stacked" mode="w" >
-False
-</property>
-<property type="string" id="format" mode="w" >
-%5.2lf%s
-</property>
-<property type="string" id="legend" mode="w" >
-${graphPoint/id}
-</property>
-<property type="long" id="limit" mode="w" >
--1
-</property>
-<property type="string" id="dpName" mode="w" >
-RX packets_Rx packets
-</property>
-<property type="string" id="cFunc" mode="w" >
-AVERAGE
-</property>
-</object>
-<object id='Tx Dropped packets' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
-<property type="long" id="sequence" mode="w" >
-2
-</property>
-<property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
-LINE
-</property>
-<property type="long" id="lineWidth" mode="w" >
-1
-</property>
-<property type="boolean" id="stacked" mode="w" >
-False
-</property>
-<property type="string" id="format" mode="w" >
-%5.2lf%s
-</property>
-<property type="string" id="legend" mode="w" >
-${graphPoint/id}
-</property>
-<property type="long" id="limit" mode="w" >
--1
-</property>
-<property type="string" id="dpName" mode="w" >
-TX Dropped packets_Tx Dropped packets
+<property type="string" id="minval" mode="w" >
+55
</property>
-<property type="string" id="cFunc" mode="w" >
-AVERAGE
+<property type="string" id="eventClass" mode="w" >
+/Unknown
</property>
-</object>
-<object id='Tx packets' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
-<property type="long" id="sequence" mode="w" >
+<property type="int" id="severity" mode="w" >
3
</property>
-<property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
-LINE
-</property>
-<property type="long" id="lineWidth" mode="w" >
-1
-</property>
-<property type="boolean" id="stacked" mode="w" >
-False
-</property>
-<property type="string" id="format" mode="w" >
-%5.2lf%s
-</property>
-<property type="string" id="legend" mode="w" >
-${graphPoint/id}
-</property>
-<property type="long" id="limit" mode="w" >
--1
-</property>
-<property type="string" id="dpName" mode="w" >
-Tx packets_Tx packets
-</property>
-<property type="string" id="cFunc" mode="w" >
-AVERAGE
+<property type="int" id="escalateCount" mode="w" >
+0
</property>
</object>
</tomanycont>
-</object>
+<tomanycont id='graphDefs'>
<object id='link quality' module='Products.ZenModel.GraphDefinition' class='GraphDefinition'>
<property type="int" id="height" mode="w" >
100
@@ -333,9 +124,6 @@ False
<property type="boolean" id="hasSummary" mode="w" >
True
</property>
-<property type="long" id="sequence" mode="w" >
-1
-</property>
<tomanycont id='graphPoints'>
<object id='quality' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
<property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
View
@@ -15,13 +15,13 @@
# These variables are overwritten by Zenoss when the ZenPack is exported
# or saved. Do not modify them directly here.
NAME = 'ZenPacks.AndreaConsadori.Raytalk'
-VERSION = '2.3'
+VERSION = '3.0'
AUTHOR = 'Andrea Consadori'
LICENSE = ''
NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.AndreaConsadori']
PACKAGES = ['ZenPacks', 'ZenPacks.AndreaConsadori', 'ZenPacks.AndreaConsadori.Raytalk']
INSTALL_REQUIRES = []
-COMPAT_ZENOSS_VERS = '>=2.2'
+COMPAT_ZENOSS_VERS = '>=3.0'
PREV_ZENPACK_NAME = ''
# STOP_REPLACEMENTS
################################

0 comments on commit a56c0e4

Please sign in to comment.