Yes, I created a Zenpack following the steps in this thread to obtain some 
stats such as HW Model, Serial No, etc.  I have a few scripts that are executed 
via net-snmp running on each SNMP box:

<pre>
getMftg.ksh:
#!/bin/ksh
model=`lsattr -El sys0 -a modelname | awk '{print $2}' | cut -c1-3`
echo $model


getModel.ksh
#!/bin/ksh
model=`lsattr -El sys0 -a modelname | awk '{print $2}' | cut -c5-12`
echo $model

getOS.ksh
#!/bin/ksh
os=`oslevel -s`
echo AIX $os

getSerial.ksh:
#!/bin/ksh
ser_num=`lsattr -El sys0 -a systemid | awk '{print $2}' | awk -F, '{print $2}'`
prefix=`echo ${ser_num} | cut -c3-4`
suffix=`echo ${ser_num} | cut -c5-9`
echo ${prefix}-${suffix}
</pre>

These scripts are called via net-snmp's snmpd.conf on each AIX box using:

<pre>
exec check_ibmserial /Admin/Scripts/snmp/getSerial.ksh
exec check_ibmmodel /Admin/Scripts/snmp/getModel.ksh
exec check_ibmmftg /Admin/Scripts/snmp/getMftg.ksh
exec check_ibmos /Admin/Scripts/snmp/getOS.ksh
</pre>

You can walk the UCD MIB to get the OID's that contain the information that is 
returned for each script.

Then, I created a basic IBMMonitor plugin which is very simple, and is modeled 
after the DellMonitor ZenPack:

<pre>
# cat /opt/zenoss/Products/IBMMonitor/modeler/plugins/IBMDeviceMap.py

class IBMDeviceMap(SnmpPlugin):
    """Map mib elements from script invoked by the remote snmpd.
    """

    maptype = "IBMDeviceMap"

    snmpGetMap = GetMap({
        '.1.3.6.1.4.1.2021.8.1.101.2' : 'setHWProductKey',
        '.1.3.6.1.4.1.2021.8.1.101.1' : 'setHWSerialNumber',
        '.1.3.6.1.4.1.2021.8.1.101.4' : 'setOSProductKey',
        #'.1.3.6.1.4.1.2021.8.1.101.3' : 'setOSProduct',
         })


    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
</pre>

Create the ZenPack as Cluther described in this thread..  As you can see, I 
can't get the osProduct to work correctly, but the information should now be 
populated when you remodel the device after you have added the ZenPack to your 
collector plugins.

You will also need to follow the other instructions in this forum which 
describe how to proxy certain MIB's to the AIX snmpd (for interface stats, 
etc).  Not sure of the exact URL, but its somewhere around here.




-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=16324#16324

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to