Hello thereâ¦
I am writing because I have some questions⦠and maybe some contributions.
My goal is to create community zenpacks for many network elements (eventually)
right now Iâm starting with a collector plugin for a single device class.
Iâm very experienced with Python and network engineering and various NMS over
the years⦠I canât find an iota of valid documentation regarding this
zenmodel collector plugin. The Zevelopment Guide stuff appears to be shaky at
best and Google has left me with a series of desires similar in breadth of
scope to an American teenager.
I need something that shows me how this class is actually supposed to be
built... the AIXfs is a great example, I guess, except it doesn't tell me that
the options are for 'maptype', 'compname', 'relname', 'modname',
'deviceProperties' or how they fit into the rest of the ZenOSS world. Data is
a goesin goesout thing, right? So those are variable assignments, aka
'goesin'. Where will they 'goesout'? What am I actually supposed to be
putting there? At this time, I don't have the time to reverse-engineer the
ZenOSS code.
My organization would like to use ZenOSS but we'll settle with the simple
graphing of Cacti glued together with other less-complete solutions if we can't
even do simple 'index' polls and look at graphs of virtual interfaces... etc.
So, knowing that I have NO IDEA what I'm doing in regard to this plugin, I do
have some code for F5 virtuals so far... I will paste it below. I know it is
wrong.... I'm just trying so many things to try to make this work and at least
get ZenModeler to *try* to use it. In zProperties, this plugin I have written
is indeed in the ColelctorPlugins list... and ZenOSS did create the .pyc file
in the dir after I dropped-in the .py... no .pyo though... and it never even
attempts to use this plugin from what I can tell. For example, I realize that
the below code doesn't even provide the full oid anywhere... that is most
likely a problem... although I'm not sure since the MIBs are loaded... etc.
Need more information. Maybe I'll wrtie the how-to after getting some answers
here. :) Here's the code:
Code:
__doc__="""F5 Virtual Map
This modeler determines the Virtuals on the device and updates appropriately.
It is up to the performance template that must be named 'F5Virtuals' to collect
the actual performance data (eg stuff and things).
"""
from CollectorPlugin import SnmpPlugin, GetTableMap
class F5VirtualMap(SnmpPlugin):
maptype = "VirtualMap"
compname = "os"
relname = "f5Virtuals"
#modname = "Products.ZenModel.VirtualAddresses"
#deviceProperties = \
# SnmpPlugin.deviceProperties + ('zVirtualMapIgnoreNames',)
#
# The columns from the MIB
#
columns = {
'.1': 'virtualname', #
'.12': 'vcurrentconn', #
'.11': 'vconnpersec', #
'.7': 'vbytesin', #
'.9': 'vbytesout', #
}
#snmpGetTableMaps = (
# GetTableMap('ltmVirtualServStatEntry',
'.1.3.6.1.4.1.3375.2.2.10.2.3.1', columns),
#)
snmpGetMap = GetMap(columns)
def process(self, device, results, log):
"""Gather Virtual Statistics List"""
log.info('processing %s for device %s', self.name(), device.id)
getdata, tabledata = results
#
# Gather the data using SNMP and just exit if there's an SNMP
# issue.
#
vtable = tabledata.get( "ltmVirtualServStatEntry" )
if not vtable:
log.warn('No SNMP response from %s for the %s plugin',
device.id, self.name() )
return
skipvipnames = getattr(device, 'zVirtualMapIgnoreNames', None)
maps = []
rm = self.relMap()
for vip in vtable.values():
if not self.checkColumns(vip, self.columns, log):
continue
if not skipvipnames:
om = self.objectMap(vip)
om.id = self.prepId(om.mount)
#
# Map our MIB data to what Zenoss expects
#
om.blockSize = 1024**2; # ie MB
rm.append(om)
maps.append(rm)
#
# As a final sanity check, see if we found anything. If we
# didn't find anything, that's probably an error so just return.
#
if len(maps) == 0:
log.warn( "No VirtualAddresses found by %s for %s",
self.name(), device.id)
return
return maps
Just need to learn how to build these... I think I could write some rockin'
community zenpacks in no time if I could figure this out. Or something. I at
least need them... would love to publish that work but I haven't seen how the
licensing works when they are trying to push the commercial zenpacks, etc...
so I will do my best not to step on any toes but point being we do need to be
able to develop these to use this product. Any help would be greatly
appreciated.
--Carl
-------------------- m2f --------------------
Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=32974#32974
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users