28 Dec 14:27
Re: Getting serial number / hardware model from IBM servers
kvisle <trygve.vea <at> gmail.com>
2007-12-28 13:27:14 GMT
2007-12-28 13:27:14 GMT
I just made a copy of HPDeviceMap and modified it slightly. This is our IBMDeviceMap.py: Code: ########################################################################### # # 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 CollectorPlugin import SnmpPlugin, GetMap class IBMDeviceMap(SnmpPlugin): """Map mib elements from IBM Director mib to get hw products and serial number. """ maptype = "IBMDeviceMap" snmpGetMap = GetMap({ '.1.3.6.1.4.1.2.6.159.1.1.60.1.1.3.6.115.121.115.116.101.109' : 'setHWSerialNumber', '.1.3.6.1.4.1.2.6.159.1.1.60.1.1.5.6.115.121.115.116.101.109' : 'setHWProductKey' }) 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 -------------------- m2f -------------------- Read this topic online here: http://community.zenoss.com/forums/viewtopic.php?p=14720#14720 -------------------- m2f --------------------
RSS Feed