Pavel,

Take a look a the plugins in $ZENHOME/Products/DataCollector/plugins/ zenoss/snmp/HRSWInstalledMap.py for and example. Here are some high level points though:

Define the type map you will be using the target class type the relationship name and the component name. here we are populating the relation dev.os.software with Sofware objects. This is most likely what you want.

    maptype = "YourSoftwareMap"
    modname = "Products.ZenModel.Software"
    relname = "software"
    compname = "os"


To get a table returned with named columns defined a tuple of GetTableMap objects at the class level.

    snmpGetTableMaps = (
        GetTableMap('swTableOid', '.1.3.6.1.2.1.25.6.3.1',
                {'.1': 'snmpindex',
                 '.2': 'setProductKey',
                 #'.4': 'type',
                 '.5': 'setInstallDate',
                 }
        ),
    )

In the method process you will be building a list of ObjectMaps that go into a RelMap. One confusing thing in this method is the way a software instance is stored. Most of the data (ie the name) goes into the class object. This is found by the zenoss backend using the setProductKey method. This key is used to find the software product for the instance you have collected (the product is under a manufacturer in the /Manufacturers root). If none is found a new one is created in the /Unknown manufacturer.

-EAD



On Oct 21, 2006, at 1:49 PM, Chlupáček Pavel wrote:

I need to write custom data collector plugin.

I found that doc on wiki si in fact just skeleton. Can you at least provide some high-level steps? I just need to query the system for software installed (i.e. patches, versions etc) which are populated over enterprise mib. Therefore need to use custom one.

I tried to undestand code, but maybe providing some guidance with reference to code will help.

Thx. p.

_______________________________________________
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

Reply via email to