Add NetApp SNMP support

This commit is contained in:
Nicolargo 2015-01-07 21:10:12 +01:00 committed by Alessio Sergi
parent 03d85a060f
commit da03ffb701
4 changed files with 17 additions and 5 deletions

View File

@ -34,7 +34,8 @@ oid_to_short_system_name = {'.*Linux.*': 'linux',
'.*BSD.*': 'bsd',
'.*Windows.*': 'windows',
'.*Cisco.*': 'cisco',
'.*VMware ESXi.*': 'esxi'}
'.*VMware ESXi.*': 'esxi',
'.*NetApp.*': 'netapp'}
class GlancesStats(object):
@ -55,7 +56,7 @@ class GlancesStats(object):
# Init the export modules list dict
self._exports = collections.defaultdict(dict)
# Load the exports modules
# Load the plugins
self.load_exports(args=args)
# Load the limits

View File

@ -31,7 +31,10 @@ snmp_oid = {'default': {'user': '1.3.6.1.4.1.2021.11.9.0',
'system': '1.3.6.1.4.1.2021.11.10.0',
'idle': '1.3.6.1.4.1.2021.11.11.0'},
'windows': {'percent': '1.3.6.1.2.1.25.3.3.1.2'},
'esxi': {'percent': '1.3.6.1.2.1.25.3.3.1.2'}}
'esxi': {'percent': '1.3.6.1.2.1.25.3.3.1.2'},
'netapp': {'system': '1.3.6.1.4.1.789.1.2.1.3.0',
'idle': '1.3.6.1.4.1.789.1.2.1.5.0',
'nb_log_core': '1.3.6.1.4.1.789.1.2.1.6.0'}}
# Define the history items list
# - 'name' define the stat identifier

View File

@ -47,7 +47,12 @@ snmp_oid = {'default': {'mnt_point': '1.3.6.1.4.1.2021.9.1.2',
'windows': {'mnt_point': '1.3.6.1.2.1.25.2.3.1.3',
'alloc_unit': '1.3.6.1.2.1.25.2.3.1.4',
'size': '1.3.6.1.2.1.25.2.3.1.5',
'used': '1.3.6.1.2.1.25.2.3.1.6'}}
'used': '1.3.6.1.2.1.25.2.3.1.6'},
'netapp': {'mnt_point': '1.3.6.1.4.1.789.1.5.4.1.2',
'device_name': '1.3.6.1.4.1.789.1.5.4.1.10',
'size': '1.3.6.1.4.1.789.1.5.4.1.3',
'used': '1.3.6.1.4.1.789.1.5.4.1.4',
'percent': '1.3.6.1.4.1.789.1.5.4.1.6'}}
snmp_oid['esxi'] = snmp_oid['windows']
# Define the history items list

View File

@ -29,7 +29,10 @@ from glances.plugins.glances_plugin import GlancesPlugin
# SNMP OID
snmp_oid = {'default': {'hostname': '1.3.6.1.2.1.1.5.0',
'system_name': '1.3.6.1.2.1.1.1.0'}}
'system_name': '1.3.6.1.2.1.1.1.0'},
'netapp': {'hostname': '1.3.6.1.2.1.1.5.0',
'system_name': '1.3.6.1.2.1.1.1.0',
'platform': '1.3.6.1.4.1.789.1.1.5.0'}}
# SNMP to human read
# Dict (key: OS short name) of dict (reg exp OID to human)