提交 ff508596 编写于 作者: N Nicolargo 提交者: Alessio Sergi

Add NetApp SNMP support

上级 21cef259
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册