diff options
author | Austin S. Hemmelgarn <ahferroin7@gmail.com> | 2018-09-26 11:38:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-26 11:38:55 -0400 |
commit | acf3b43523224d5685d9ac5c794aeb49dba076f6 (patch) | |
tree | 6ee0e37f2cde78c03cfc2e666c7ee752519d195a /python.d | |
parent | f7bddbe07b4b606ce75bdc1cf87502b4b8986643 (diff) |
Python.d PEP 8 cleanup, modules D-H (#4287)
* python.d/dnsdist.chart.py PEP 8 cleanup
* Converted tabs in indentation to spaces (this is why the diff looks
huge).
* Fixed container literal formatting.
* General cleanup regarding blank lines.
* python.d/dns_query_time.chart.py PEP 8 cleanup
Fixed container literal formatting.
* python.d/dockerd.chart.py PEP 8 cleanup
Fixed overly long lines and trailing empty line.
* python.d/dovecot.chart.py PEP 8 cleanup
Made string literals use consistent quoting and fixed container literal
formatting.
* python.d/elasticsearch.chart.py PEP 8 cleanup
Fixed container literal formatting.
* python.d/exim.chart.py PEP 8 cleanup
Fixed string quoting and container literal formatting.
* python.d/fail2ban.chart.py PEP 8 cleanup
Fixed string quoting and container literal formatting.
* python.d/freeradius.chart.py PEP 8 cleanup
Fixed quoting of strings and formatting of container literals.
* python.d/go_expvar.chart.py PEP 8 cleanup
Fixed formatting of conainer literals.
* python.d/haproxy.chart.py PEP 8 cleanup
Make string quoting consistent and fix formatting of container literals.
* python.d/httpcheck.chart.py PEP 8 cleanup
Fixed quoting of strings and formatting of container literals.
* Fix syntax issue in httpcheck module caused by previous commit.
Diffstat (limited to 'python.d')
-rw-r--r-- | python.d/dns_query_time.chart.py | 26 | ||||
-rw-r--r-- | python.d/dnsdist.chart.py | 213 | ||||
-rw-r--r-- | python.d/dockerd.chart.py | 10 | ||||
-rw-r--r-- | python.d/dovecot.chart.py | 86 | ||||
-rw-r--r-- | python.d/elasticsearch.chart.py | 133 | ||||
-rw-r--r-- | python.d/exim.chart.py | 7 | ||||
-rw-r--r-- | python.d/fail2ban.chart.py | 57 | ||||
-rw-r--r-- | python.d/freeradius.chart.py | 23 | ||||
-rw-r--r-- | python.d/go_expvar.chart.py | 21 | ||||
-rw-r--r-- | python.d/haproxy.chart.py | 242 | ||||
-rw-r--r-- | python.d/httpcheck.chart.py | 17 |
11 files changed, 489 insertions, 346 deletions
diff --git a/python.d/dns_query_time.chart.py b/python.d/dns_query_time.chart.py index ae54f1006e..5bc95c4f6a 100644 --- a/python.d/dns_query_time.chart.py +++ b/python.d/dns_query_time.chart.py @@ -4,18 +4,22 @@ # SPDX-License-Identifier: GPL-3.0+ from random import choice -from threading import Thread from socket import getaddrinfo, gaierror +from threading import Thread try: from time import monotonic as time except ImportError: from time import time + try: - import dns.message, dns.query, dns.name + import dns.message + import dns.query + import dns.name DNS_PYTHON = True except ImportError: DNS_PYTHON = False + try: from queue import Queue except ImportError: @@ -118,8 +122,12 @@ def check_ns(ns): def create_charts(aggregate, server_list): if aggregate: order = ['dns_group'] - definitions = {'dns_group': {'options': [None, 'DNS Response Time', 'ms', 'name servers', - 'dns_query_time.response_time', 'line'], 'lines': []}} + definitions = { + 'dns_group': { + 'options': [None, 'DNS Response Time', 'ms', 'name servers', 'dns_query_time.response_time', 'line'], + 'lines': [] + } + } for ns in server_list: definitions['dns_group']['lines'].append(['_'.join(['ns', ns.replace('.', '_')]), ns, 'absolute']) @@ -128,8 +136,10 @@ def create_charts(aggregate, server_list): order = [''.join(['dns_', ns.replace('.', '_')]) for ns in server_list] definitions = dict() for ns in server_list: - definitions[''.join(['dns_', ns.replace('.', '_')])] = {'options': [None, 'DNS Response Time', 'ms', ns, - 'dns_query_time.response_time', 'area'], - 'lines': [['_'.join(['ns', ns.replace('.', '_')]), - ns, 'absolute']]} + definitions[''.join(['dns_', ns.replace('.', '_')])] = { + 'options': [None, 'DNS Response Time', 'ms', ns, 'dns_query_time.response_time', 'area'], + 'lines': [ + ['_'.join(['ns', ns.replace('.', '_')]), ns, 'absolute'] + ] + } return order, definitions diff --git a/python.d/dnsdist.chart.py b/python.d/dnsdist.chart.py index 74e2970483..4a44adebb0 100644 --- a/python.d/dnsdist.chart.py +++ b/python.d/dnsdist.chart.py @@ -1,102 +1,133 @@ # -*- coding: utf-8 -*- # SPDX-License-Identifier: GPL-3.0+ + from json import loads + from bases.FrameworkServices.UrlService import UrlService -ORDER = ['queries', 'queries_dropped', 'packets_dropped', 'answers', 'backend_responses', 'backend_commerrors', 'backend_errors', 'cache', 'servercpu', 'servermem', 'query_latency', 'query_latency_avg'] + +ORDER = [ + 'queries', + 'queries_dropped', + 'packets_dropped', + 'answers', + 'backend_responses', + 'backend_commerrors', + 'backend_errors', + 'cache', + 'servercpu', + 'servermem', + 'query_latency', + 'query_latency_avg' +] + + CHARTS = { - 'queries': { - 'options': [None, 'Client queries received', 'queries/s', 'queries', 'dnsdist.queries', 'line'], - 'lines': [ - ['queries', 'all', 'incremental'], - ['rdqueries', 'recursive', 'incremental'], - ['empty-queries', 'empty', 'incremental'] - ]}, - 'queries_dropped': { - 'options': [None, 'Client queries dropped', 'queries/s', 'queries', 'dnsdist.queries_dropped', 'line'], - 'lines': [ - ['rule-drop', 'rule drop', 'incremental'], - ['dyn-blocked', 'dynamic block', 'incremental'], - ['no-policy', 'no policy', 'incremental'], - ['noncompliant-queries', 'non compliant', 'incremental'] - ]}, - 'packets_dropped': { - 'options': [None, 'Packets dropped', 'packets/s', 'packets', 'dnsdist.packets_dropped', 'line'], - 'lines': [ - ['acl-drops', 'acl', 'incremental'] - ]}, - 'answers': { - 'options': [None, 'Answers statistics', 'answers/s', 'answers', 'dnsdist.answers', 'line'], - 'lines': [ - ['self-answered', 'self answered', 'incremental'], - ['rule-nxdomain', 'nxdomain', 'incremental', -1], - ['rule-refused', 'refused', 'incremental', -1], - ['trunc-failures', 'trunc failures', 'incremental', -1] - ]}, - 'backend_responses': { - 'options': [None, 'Backend responses', 'responses/s', 'backends', 'dnsdist.backend_responses', 'line'], - 'lines': [ - ['responses', 'responses', 'incremental'] - ]}, - 'backend_commerrors': { - 'options': [None, 'Backend Communication Errors', 'errors/s', 'backends', 'dnsdist.backend_commerrors', 'line'], - 'lines': [ - ['downstream-send-errors', 'send errors', 'incremental'] - ]}, - 'backend_errors': { - 'options': [None, 'Backend error responses', 'responses/s', 'backends', 'dnsdist.backend_errors', 'line'], - 'lines': [ - ['downstream-timeouts', 'timeout', 'incremental'], - ['servfail-responses', 'servfail', 'incremental'], - ['noncompliant-responses', 'non compliant', 'incremental'] - ]}, - 'cache': { - 'options': [None, 'Cache performance', 'answers/s', 'cache', 'dnsdist.cache', 'area'], - 'lines': [ - ['cache-hits', 'hits', 'incremental'], - ['cache-misses', 'misses', 'incremental', -1] - ]}, - 'servercpu': { - 'options': [None, 'DNSDIST server CPU utilization', 'ms/s', 'server', 'dnsdist.servercpu', 'stacked'], - 'lines': [ - ['cpu-sys-msec', 'system state', 'incremental'], - ['cpu-user-msec', 'user state', 'incremental'] - ]}, - 'servermem': { - 'options': [None, 'DNSDIST server memory utilization', 'MB', 'server', 'dnsdist.servermem', 'area'], - 'lines': [ - ['real-memory-usage', 'memory usage', 'absolute', 1, 1048576] - ]}, - 'query_latency': { - 'options': [None, 'Query latency', 'queries/s', 'latency', 'dnsdist.query_latency', 'stacked'], - 'lines': [ - ['latency0-1', '1ms', 'incremental'], - ['latency1-10', '10ms', 'incremental'], - ['latency10-50', '50ms', 'incremental'], - ['latency50-100', '100ms', 'incremental'], - ['latency100-1000', '1sec', 'incremental'], - ['latency-slow', 'slow', 'incremental'] - ]}, - 'query_latency_avg': { - 'options': [None, 'Average latency for the last N queries', 'ms/query', 'latency', 'dnsdist.query_latency_avg', 'line'], - 'lines': [ - ['latency-avg100', '100', 'absolute'], - ['latency-avg1000', '1k', 'absolute'], - ['latency-avg10000', '10k', 'absolute'], - ['latency-avg1000000', '1000k', 'absolute'] - ]} + 'queries': { + 'options': [None, 'Client queries received', 'queries/s', 'queries', 'dnsdist.queries', 'line'], + 'lines': [ + ['queries', 'all', 'incremental'], + ['rdqueries', 'recursive', 'incremental'], + ['empty-queries', 'empty', 'incremental'] + ] + }, + 'queries_dropped': { + 'options': [None, 'Client queries dropped', 'queries/s', 'queries', 'dnsdist.queries_dropped', 'line'], + 'lines': [ + ['rule-drop', 'rule drop', 'incremental'], + ['dyn-blocked', 'dynamic block', 'incremental'], + ['no-policy', 'no policy', 'incremental'], + ['noncompliant-queries', 'non compliant', 'incremental'] + ] + }, + 'packets_dropped': { + 'options': [None, 'Packets dropped', 'packets/s', 'packets', 'dnsdist.packets_dropped', 'line'], + 'lines': [ + ['acl-drops', 'acl', 'incremental'] + ] + }, + 'answers': { + 'options': [None, 'Answers statistics', 'answers/s', 'answers', 'dnsdist.answers', 'line'], + 'lines': [ + ['self-answered', 'self answered', 'incremental'], + ['rule-nxdomain', 'nxdomain', 'incremental', -1], + ['rule-refused', 'refused', 'incremental', -1], + ['trunc-failures', 'trunc failures', 'incremental', -1] + ] + }, + 'backend_responses': { + 'options': [None, 'Backend responses', 'responses/s', 'backends', 'dnsdist.backend_responses', 'line'], + 'lines': [ + ['responses', 'responses', 'incremental'] + ] + }, + 'backend_commerrors': { + 'options': [None, 'Backend Communication Errors', 'errors/s', 'backends', 'dnsdist.backend_commerrors', 'line'], + 'lines': [ + ['downstream-send-errors', 'send errors', 'incremental'] + ] + }, + 'backend_errors': { + 'options': [None, 'Backend error responses', 'responses/s', 'backends', 'dnsdist.backend_errors', 'line'], + 'lines': [ + ['downstream-timeouts', 'timeout', 'incremental'], + ['servfail-responses', 'servfail', 'incremental'], + ['noncompliant-responses', 'non compliant', 'incremental'] + ] + }, + 'cache': { + 'options': [None, 'Cache performance', 'answers/s', 'cache', 'dnsdist.cache', 'area'], + 'lines': [ + ['cache-hits', 'hits', 'incremental'], + ['cache-misses', 'misses', 'incremental', -1] + ] + }, + 'servercpu': { + 'options': [None, 'DNSDIST server CPU utilization', 'ms/s', 'server', 'dnsdist.servercpu', 'stacked'], + 'lines': [ + ['cpu-sys-msec', 'system state', 'incremental'], + ['cpu-user-msec', 'user state', 'incremental'] + ] + }, + 'servermem': { + 'options': [None, 'DNSDIST server memory utilization', 'MB', 'server', 'dnsdist.servermem', 'area'], + 'lines': [ + ['real-memory-usage', 'memory usage', 'absolute', 1, 1048576] + ] + }, + 'query_latency': { + 'options': [None, 'Query latency', 'queries/s', 'latency', 'dnsdist.query_latency', 'stacked'], + 'lines': [ + ['latency0-1', '1ms', 'incremental'], + ['latency1-10', '10ms', 'incremental'], + ['latency10-50', '50ms', 'incremental'], + ['latency50-100', '100ms', 'incremental'], + ['latency100-1000', '1sec', 'incremental'], + ['latency-slow', 'slow', 'incremental'] + ] + }, + 'query_latency_avg': { + 'options': [None, 'Average latency for the last N queries', 'ms/query', 'latency', + 'dnsdist.query_latency_avg', 'line'], + 'lines': [ + ['latency-avg100', '100', 'absolute'], + ['latency-avg1000', '1k', 'absolute'], + ['latency-avg10000', '10k', 'absolute'], + ['latency-avg1000000', '1000k', 'absolute'] + ] + } } -class Service(UrlService): - def __init__(self, configuration=None, name=None): - UrlService.__init__(self, configuration=configuration, name=name) - self.order = ORDER - self.definitions = CHARTS - def _get_data(self): - data = self._get_raw_data() - if not data: - return None +class Service(UrlService): + def __init__(self, configuration=None, name=None): + UrlService.__init__(self, configuration=configuration, name=name) + self.order = ORDER + self.definitions = CHARTS - return loads(data) + def _get_data(self): + data = self._get_raw_data() + if not data: + return None + return loads(data) diff --git a/python.d/dockerd.chart.py b/python.d/dockerd.chart.py index f183c44e45..a0d3d7e650 100644 --- a/python.d/dockerd.chart.py +++ b/python.d/dockerd.chart.py @@ -24,19 +24,22 @@ ORDER = [ CHARTS = { 'running_containers': { - 'options': [None, 'Number of running containers', 'running containers', 'running containers', 'docker.running_containers', 'line'], + 'options': [None, 'Number of running containers', 'running containers', 'running containers', + 'docker.running_containers', 'line'], 'lines': [ ['running_containers', 'running'] ] }, 'healthy_containers': { - 'options': [None, 'Number of healthy containers', 'healthy containers', 'healthy containers', 'docker.healthy_containers', 'line'], + 'options': [None, 'Number of healthy containers', 'healthy containers', 'healthy containers', + 'docker.healthy_containers', 'line'], 'lines': [ ['healthy_containers', 'healthy'] ] }, 'unhealthy_containers': { - 'options': [None, 'Number of unhealthy containers', 'unhealthy containers', 'unhealthy containers', 'docker.unhealthy_containers', 'line'], + 'options': [None, 'Number of unhealthy containers', 'unhealthy containers', 'unhealthy containers', + 'docker.unhealthy_containers', 'line'], 'lines': [ ['unhealthy_containers', 'unhealthy'] ] @@ -72,4 +75,3 @@ class Service(SimpleService): data['unhealthy_containers'] = len(self.client.containers.list(filters={'health': 'unhealthy'}, sparse=True)) return data or None - diff --git a/python.d/dovecot.chart.py b/python.d/dovecot.chart.py index 1a6153357b..df58c1850b 100644 --- a/python.d/dovecot.chart.py +++ b/python.d/dovecot.chart.py @@ -11,93 +11,113 @@ priority = 60000 retries = 60 # charts order (can be overridden if you want less charts, or different order) -ORDER = ['sessions', 'logins', 'commands', - 'faults', - 'context_switches', - 'io', 'net', 'syscalls', - 'lookup', 'cache', - 'auth', 'auth_cache'] +ORDER = [ + 'sessions', + 'logins', + 'commands', + 'faults', + 'context_switches', + 'io', + 'net', + 'syscalls', + 'lookup', + 'cache', + 'auth', + 'auth_cache' +] CHARTS = { 'sessions': { - 'options': [None, "Dovecot Active Sessions", 'number', 'sessions', 'dovecot.sessions', 'line'], + 'options': [None, 'Dovecot Active Sessions', 'number', 'sessions', 'dovecot.sessions', 'line'], 'lines': [ ['num_connected_sessions', 'active sessions', 'absolute'] - ]}, + ] + }, 'logins': { - 'options': [None, "Dovecot Logins", 'number', 'logins', 'dovecot.logins', 'line'], + 'options': [None, 'Dovecot Logins', 'number', 'logins', 'dovecot.logins', 'line'], 'lines': [ ['num_logins', 'logins', 'absolute'] - ]}, + ] + }, 'commands': { - 'options': [None, "Dovecot Commands", "commands", 'commands', 'dovecot.commands', 'line'], + 'options': [None, 'Dovecot Commands', 'commands', 'commands', 'dovecot.commands', 'line'], 'lines': [ ['num_cmds', 'commands', 'absolute'] - ]}, + ] + }, 'faults': { - 'options': [None, "Dovecot Page Faults", "faults", 'page faults', 'dovecot.faults', 'line'], + 'options': [None, 'Dovecot Page Faults', 'faults', 'page faults', 'dovecot.faults', 'line'], 'lines': [ ['min_faults', 'minor', 'absolute'], ['maj_faults', 'major', 'absolute'] - ]}, + ] + }, 'context_switches': { - 'options': [None, "Dovecot Context Switches", '', 'context switches', 'dovecot.context_switches', 'line'], + 'options': [None, 'Dovecot Context Switches', '', 'context switches', 'dovecot.context_switches', 'line'], 'lines': [ ['vol_cs', 'voluntary', 'absolute'], ['invol_cs', 'involuntary', 'absolute'] - ]}, + ] + }, 'io': { - 'options': [None, "Dovecot Disk I/O", 'kilobytes/s', 'disk', 'dovecot.io', 'area'], + 'options': [None, 'Dovecot Disk I/O', 'kilobytes/s', 'disk', 'dovecot.io', 'area'], 'lines': [ ['disk_input', 'read', 'incremental', 1, 1024], ['disk_output', 'write', 'incremental', -1, 1024] - ]}, + ] + }, 'net': { - 'options': [None, "Dovecot Network Bandwidth", 'kilobits/s', 'network', 'dovecot.net', 'area'], + 'options': [None, 'Dovecot Network Bandwidth', 'kilobits/s', 'network', 'dovecot.net', 'area'], 'lines': [ ['read_bytes', 'read', 'incremental', 8, 1024], ['write_bytes', 'write', 'incremental', -8, 1024] - ]}, + ] + }, 'syscalls': { - 'options': [None, "Dovecot Number of SysCalls", 'syscalls/s', 'system', 'dovecot.syscalls', 'line'], + 'options': [None, 'Dovecot Number of SysCalls', 'syscalls/s', 'system', 'dovecot.syscalls', 'line'], 'lines': [ ['read_count', 'read', 'incremental'], ['write_count', 'write', 'incremental'] - ]}, + ] + }, 'lookup': { - 'options': [None, "Dovecot Lookups", 'number/s', 'lookups', 'dovecot.lookup', 'stacked'], + 'options': [None, 'Dovecot Lookups', 'number/s', 'lookups', 'dovecot.lookup', 'stacked'], 'lines': [ ['mail_lookup_path', 'path', 'incremental'], ['mail_lookup_attr', 'attr', 'incremental'] - ]}, + ] + }, 'cache': { - 'options': [None, "Dovecot Cache Hits", 'hits/s', 'cache', 'dovecot.cache', 'line'], + 'options': [None, 'Dovecot Cache Hits', 'hits/s', 'cache', 'dovecot.cache', 'line'], 'lines': [ ['mail_cache_hits', 'hits', 'incremental'] - ]}, + ] + }, 'auth': { - 'options': [None, "Dovecot Authentications", 'attempts', 'logins', 'dovecot.auth', 'stacked'], + 'options': [None, 'Dovecot Authentications', 'attempts', 'logins', 'dovecot.auth', 'stacked'], 'lines': [ ['auth_successes', 'ok', 'absolute'], ['auth_failures', 'failed', 'absolute'] - ]}, + ] + }, 'auth_cache': { - 'options': [None, "Dovecot Authentication Cache", 'number', 'cache', 'dovecot.auth_cache', 'stacked'], + 'options': [None, 'Dovecot Authentication Cache', 'number', 'cache', 'dovecot.auth_cache', 'stacked'], 'lines': [ ['auth_cache_hits', 'hit', 'absolute'], ['auth_cache_misses', 'miss', 'absolute'] - ]} + ] + } } class Service(SocketService): def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) - self.request = "EXPORT\tglobal\r\n" + self.request = 'EXPORT\tglobal\r\n' self.host = None # localhost self.port = None # 24242 # self._keep_alive = True - self.unix_socket = "/var/run/dovecot/stats" + self.unix_socket = '/var/run/dovecot/stats' self.order = ORDER self.definitions = CHARTS @@ -112,7 +132,7 @@ class Service(SocketService): return None if raw is None: - self.debug("dovecot returned no data") + self.debug('dovecot returned no data') return None data = raw.split('\n')[:2] diff --git a/python.d/elasticsearch.chart.py b/python.d/elasticsearch.chart.py index 3a95dec9d8..d7fc5fd22a 100644 --- a/python.d/elasticsearch.chart.py +++ b/python.d/elasticsearch.chart.py @@ -110,18 +110,22 @@ HEALTH_STATS = [ ] LATENCY = { - 'query_latency': - {'total': 'indices_search_query_total', - 'spent_time': 'indices_search_query_time_in_millis'}, - 'fetch_latency': - {'total': 'indices_search_fetch_total', - 'spent_time': 'indices_search_fetch_time_in_millis'}, - 'indexing_latency': - {'total': 'indices_indexing_index_total', - 'spent_time': 'indices_indexing_index_time_in_millis'}, - 'flushing_latency': - {'total': 'indices_flush_total', - 'spent_time': 'indices_flush_total_time_in_millis'} + 'query_latency': { + 'total': 'indices_search_query_total', + 'spent_time': 'indices_search_query_time_in_millis' + }, + 'fetch_latency': { + 'total': 'indices_search_fetch_total', + 'spent_time': 'indices_search_fetch_time_in_millis' + }, + 'indexing_latency': { + 'total': 'indices_indexing_index_total', + 'spent_time': 'indices_indexing_index_time_in_millis' + }, + 'flushing_latency': { + 'total': 'indices_flush_total', + 'spent_time': 'indices_flush_total_time_in_millis' + } } # charts order (can be overridden if you want less charts, or different order) @@ -170,27 +174,31 @@ CHARTS = { 'lines': [ ['indices_search_query_total', 'queries', 'incremental'], ['indices_search_fetch_total', 'fetches', 'incremental'] - ]}, + ] + }, 'search_performance_current': { 'options': [None, 'Queries and Fetches In Progress', 'number of', 'search performance', 'elastic.search_performance_current', 'stacked'], 'lines': [ ['indices_search_query_current', 'queries', 'absolute'], ['indices_search_fetch_current', 'fetches', 'absolute'] - ]}, + ] + }, 'search_performance_time': { 'options': [None, 'Time Spent On Queries And Fetches', 'seconds', 'search performance', 'elastic.search_performance_time', 'stacked'], 'lines': [ ['indices_search_query_time_in_millis', 'query', 'incremental', 1, 1000], ['indices_search_fetch_time_in_millis', 'fetch', 'incremental', 1, 1000] - ]}, + ] + }, 'search_latency': { 'options': [None, 'Query And Fetch Latency', 'ms', 'search performance', 'elastic.search_latency', 'stacked'], 'lines': [ ['query_latency', 'query', 'absolute', 1, 1000], ['fetch_latency', 'fetch', 'absolute', 1, 1000] - ]}, + ] + }, 'index_performance_total': { 'options': [None, 'Indexed Documents, Index Refreshes, Index Flushes To Disk', 'number of', 'indexing performance', 'elastic.index_performance_total', 'stacked'], @@ -198,13 +206,15 @@ CHARTS = { ['indices_indexing_index_total', 'indexed', 'incremental'], ['indices_refresh_total', 'refreshes', 'incremental'], ['indices_flush_total', 'flushes', 'incremental'] - ]}, + ] + }, 'index_performance_current': { 'options': [None, 'Number Of Documents Currently Being Indexed', 'currently indexed', 'indexing performance', 'elastic.index_performance_current', 'stacked'], 'lines': [ ['indices_indexing_index_current', 'documents', 'absolute'] - ]}, + ] + }, 'index_performance_time': { 'options': [None, 'Time Spent On Indexing, Refreshing, Flushing', 'seconds', 'indexing performance', 'elastic.index_performance_time', 'stacked'], @@ -212,40 +222,46 @@ CHARTS = { ['indices_indexing_index_time_in_millis', 'indexing', 'incremental', 1, 1000], ['indices_refresh_total_time_in_millis', 'refreshing', 'incremental', 1, 1000], ['indices_flush_total_time_in_millis', 'flushing', 'incremental', 1, 1000] - ]}, + ] + }, 'index_latency': { 'options': [None, 'Indexing And Flushing Latency', 'ms', 'indexing performance', 'elastic.index_latency', 'stacked'], 'lines': [ ['indexing_latency', 'indexing', 'absolute', 1, 1000], ['flushing_latency', 'flushing', 'absolute', 1, 1000] - ]}, + ] + }, 'index_translog_operations': { 'options': [None, 'Translog Operations', 'count', 'translog', 'elastic.index_translog_operations', 'area'], 'lines': [ ['indices_translog_operations', 'total', 'absolute'], ['indices_translog_uncommitted_operations', 'uncommited', 'absolute'] - ]}, + ] + }, 'index_translog_size': { 'options': [None, 'Translog Size', 'MB', 'translog', 'elastic.index_translog_size', 'area'], 'lines': [ ['indices_translog_size_in_bytes', 'total', 'absolute', 1, 1048567], ['indices_translog_uncommitted_size_in_bytes', 'uncommited', 'absolute', 1, 1048567] - ]}, + ] + }, 'index_segments_count': { 'options': [None, 'Total Number Of Indices Segments', 'count', 'indices segments', 'elastic.index_segments_count', 'line'], 'lines': [ ['indices_segments_count', 'segments', 'absolute'] - ]}, + ] + }, 'index_segments_memory_writer': { 'options': [None, 'Index Writer Memory Usage', 'MB', 'indices segments', 'elastic.index_segments_memory_writer', 'area'], 'lines': [ ['indices_segments_index_writer_memory_in_bytes', 'total', 'absolute', 1, 1048567] - ]}, + ] + }, 'index_segments_memory': { 'options': [None, 'Indices Segments Memory Usage', 'MB', 'indices segments', 'elastic.index_segments_memory', 'stacked'], @@ -258,54 +274,62 @@ CHARTS = { ['indices_segments_doc_values_memory_in_bytes', 'doc values', 'absolute', 1, 1048567], ['indices_segments_version_map_memory_in_bytes', 'version map', 'absolute', 1, 1048567], ['indices_segments_fixed_bit_set_memory_in_bytes', 'fixed bit set', 'absolute', 1, 1048567] - ]}, + ] + }, 'jvm_mem_heap': { 'options': [None, 'JVM Heap Percentage Currently in Use', 'percent', 'memory usage and gc', 'elastic.jvm_heap', 'area'], 'lines': [ ['jvm_mem_heap_used_percent', 'inuse', 'absolute'] - ]}, + ] + }, 'jvm_mem_heap_bytes': { 'options': [None, 'JVM Heap Commit And Usage', 'MB', 'memory usage and gc', 'elastic.jvm_heap_bytes', 'area'], 'lines': [ ['jvm_mem_heap_committed_in_bytes', 'commited', 'absolute', 1, 1048576], ['jvm_mem_heap_used_in_bytes', 'used', 'absolute', 1, 1048576] - ]}, + ] + }, 'jvm_buffer_pool_count': { 'options': [None, 'JVM Buffers', 'count', 'memory usage and gc', 'elastic.jvm_buffer_pool_count', 'line'], 'lines': [ ['jvm_buffer_pools_direct_count', 'direct', 'absolute'], ['jvm_buffer_pools_mapped_count', 'mapped', 'absolute'] - ]}, + ] + }, 'jvm_direct_buffers_memory': { 'options': [None, 'JVM Direct Buffers Memory', 'MB', 'memory usage and gc', 'elastic.jvm_direct_buffers_memory', 'area'], 'lines': [ ['jvm_buffer_pools_direct_used_in_bytes', 'used', 'absolute', 1, 1048567], ['jvm_buffer_pools_direct_total_capacity_in_bytes', 'total capacity', 'absolute', 1, 1048567] - ]}, + ] + }, 'jvm_mapped_buffers_memory': { 'options': [None, 'JVM Mapped Buffers Memory', 'MB', 'memory usage and gc', 'elastic.jvm_mapped_buffers_memory', 'area'], 'lines': [ ['jvm_buffer_pools_mapped_used_in_bytes', 'used', 'absolute', 1, 1048567], ['jvm_buffer_pools_mapped_total_capacity_in_bytes', 'total capacity', 'absolute', 1, 1048567] - ]}, + ] + }, 'jvm_gc_count': { 'options': [None, 'Garbage Collections', 'counts', 'memory usage and gc', 'elastic.gc_count', 'stacked'], 'lines': [ ['jvm_gc_collectors_young_collection_count', 'young', 'incremental'], ['jvm_gc_collectors_old_collection_count', 'old', 'incremental'] - ]}, + ] + }, 'jvm_gc_time': { 'options': [None, 'Time Spent On Garbage Collections', 'ms', 'memory usage and gc', 'elastic.gc_time', 'stacked'], 'lines': [ ['jvm_gc_collectors_young_collection_time_in_millis', 'young', 'incremental'], ['jvm_gc_collectors_old_collection_time_in_millis', 'old', 'incremental'] - ]}, + ] + }, 'thread_pool_queued': { 'options': [None, 'Number Of Queued Threads In Thread Pool', 'queued threads', 'queues and rejections', 'elastic.thread_pool_queued', 'stacked'], @@ -315,7 +339,8 @@ CHARTS = { ['thread_pool_index_queue', 'index', 'absolute'], ['thread_pool_search_queue', 'search', 'absolute'], ['thread_pool_merge_queue', 'merge', 'absolute'] - ]}, + ] + }, 'thread_pool_rejected': { 'options': [None, 'Rejected Threads In Thread Pool', 'rejected threads', 'queues and rejections', 'elastic.thread_pool_rejected', 'stacked'], @@ -325,19 +350,22 @@ CHARTS = { ['thread_pool_index_rejected', 'index', 'absolute'], ['thread_pool_search_rejected', 'search', 'absolute'], ['thread_pool_merge_rejected', 'merge', 'absolute'] - ]}, + ] + }, 'fielddata_cache': { 'options': [None, 'Fielddata Cache', 'MB', 'fielddata cache', 'elastic.fielddata_cache', 'line'], 'lines': [ ['indices_fielddata_memory_size_in_bytes', 'cache', 'absolute', 1, 1048576] - ]}, + ] + }, 'fielddata_evictions_tripped': { 'options': [None, 'Fielddata Evictions And Circuit Breaker Tripped Count', 'number of events', 'fielddata cache', 'elastic.fielddata_evictions_tripped', 'line'], 'lines': [ ['indices_fielddata_evictions', 'evictions', 'incremental'], ['indices_fielddata_tripped', 'tripped', 'incremental'] - ]}, + ] + }, 'cluster_health_nodes': { 'options': [None, 'Nodes And Tasks Statistics', 'units', 'cluster health API', 'elastic.cluster_health_nodes', 'stacked'], @@ -346,7 +374,8 @@ CHARTS = { ['number_of_data_nodes', 'data_nodes', 'absolute'], ['number_of_pending_tasks', 'pending_tasks', 'absolute'], ['number_of_in_flight_fetch', 'in_flight_fetch', 'absolute'] - ]}, + ] + }, 'cluster_health_status': { 'options': [None, 'Cluster Status', 'status', 'cluster health API', 'elastic.cluster_health_status', 'area'], @@ -357,7 +386,8 @@ CHARTS = { ['status_foo2', None, 'absolute'], ['status_foo3', None, 'absolute'], ['status_yellow', 'yellow', 'absolute'] - ]}, + ] + }, 'cluster_health_shards': { 'options': [None, 'Shards Statistics', 'shards', 'cluster health API', 'elastic.cluster_health_shards', 'stacked'], @@ -368,7 +398,8 @@ CHARTS = { ['delayed_unassigned_shards', 'delayed_unassigned', 'absolute'], ['initializing_shards', 'initializing', 'absolute'], ['active_shards_percent_as_number', 'active_percent', 'absolute'] - ]}, + ] + }, 'cluster_stats_nodes': { 'options': [None, 'Nodes Statistics', 'nodes', 'cluster stats API', 'elastic.cluster_nodes', 'stacked'], @@ -378,52 +409,60 @@ CHARTS = { ['nodes_count_total', 'total', 'absolute'], ['nodes_count_master_only', 'master_only', 'absolute'], ['nodes_count_client', 'client', 'absolute'] - ]}, + ] + }, 'cluster_stats_query_cache': { 'options': [None, 'Query Cache Statistics', 'queries', 'cluster stats API', 'elastic.cluster_query_cache', 'stacked'], 'lines': [ ['indices_query_cache_hit_count', 'hit', 'incremental'], ['indices_query_cache_miss_count', 'miss', 'incremental'] - ]}, + ] + }, 'cluster_stats_docs': { 'options': [None, 'Docs Statistics', 'count', 'cluster stats API', 'elastic.cluster_docs', 'line'], 'lines': [ ['indices_docs_count', 'docs', 'absolute'] - ]}, + ] + }, 'cluster_stats_store': { 'options': [None, 'Store Statistics', 'MB', 'cluster stats API', 'elastic.cluster_store', 'line'], 'lines': [ ['indices_store_size_in_bytes', 'size', 'absolute', 1, 1048567] - ]}, + ] + }, 'cluster_stats_indices_shards': { 'options': [None, 'Indices And Shards Statistics', 'count', 'cluster stats API', ' |