-
Notifications
You must be signed in to change notification settings - Fork 45
/
MKDeviceMap.py
35 lines (28 loc) · 1.23 KB
/
MKDeviceMap.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#s 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 MKDeviceMap(SnmpPlugin):
"""Map mib elements from Microtick mib to get hw and os products.
"""
maptype = "MKDeviceMap"
snmpGetMap = GetMap({
# '.1.2.840.10036.3.1.2.1.2.2' : 'manufacturer',
'.1.3.6.1.4.1.14988.1.1.3.9.0' : 'setHWProductKey',
'.1.3.6.1.4.1.14988.1.1.4.1.0' : 'setHWSerialNumber',
'.1.3.6.1.4.1.14988.1.1.4.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