From 8a7b72f7cd1ccd547a03eb4243294e741d661d3f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 8 Feb 2019 08:30:37 +0100 Subject: Adding upstream version 1.12.0. Signed-off-by: Daniel Baumann --- collectors/python.d.plugin/couchdb/README.md | 2 + .../python.d.plugin/couchdb/couchdb.chart.py | 47 +++++++++------------- collectors/python.d.plugin/couchdb/couchdb.conf | 10 ++--- 3 files changed, 24 insertions(+), 35 deletions(-) (limited to 'collectors/python.d.plugin/couchdb') diff --git a/collectors/python.d.plugin/couchdb/README.md b/collectors/python.d.plugin/couchdb/README.md index eff8c0810..2cc353edb 100644 --- a/collectors/python.d.plugin/couchdb/README.md +++ b/collectors/python.d.plugin/couchdb/README.md @@ -33,3 +33,5 @@ local: ``` --- + +[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fcollectors%2Fpython.d.plugin%2Fcouchdb%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)]() diff --git a/collectors/python.d.plugin/couchdb/couchdb.chart.py b/collectors/python.d.plugin/couchdb/couchdb.chart.py index 5d6b9916f..a58694d70 100644 --- a/collectors/python.d.plugin/couchdb/couchdb.chart.py +++ b/collectors/python.d.plugin/couchdb/couchdb.chart.py @@ -8,6 +8,7 @@ from collections import namedtuple, defaultdict from json import loads from threading import Thread from socket import gethostbyname, gaierror + try: from queue import Queue except ImportError: @@ -15,10 +16,9 @@ except ImportError: from bases.FrameworkServices.UrlService import UrlService -# default module values (can be overridden per job in `config`) + update_every = 1 -priority = 60000 -retries = 60 + METHODS = namedtuple('METHODS', ['get_data', 'url', 'stats']) @@ -109,7 +109,7 @@ ORDER = [ CHARTS = { 'activity': { - 'options': [None, 'Overall Activity', 'req/s', + 'options': [None, 'Overall Activity', 'requests/s', 'dbactivity', 'couchdb.activity', 'stacked'], 'lines': [ ['couchdb_database_reads', 'DB reads', 'incremental'], @@ -118,7 +118,7 @@ CHARTS = { ] }, 'request_methods': { - 'options': [None, 'HTTP request methods', 'req/s', + 'options': [None, 'HTTP request methods', 'requests/s', 'httptraffic', 'couchdb.request_methods', 'stacked'], 'lines': [ @@ -133,7 +133,7 @@ CHARTS = { ] }, 'response_codes': { - 'options': [None, 'HTTP response status codes', 'resp/s', + 'options': [None, 'HTTP response status codes', 'responses/s', 'httptraffic', 'couchdb.response_codes', 'stacked'], 'lines': [ @@ -151,15 +151,13 @@ CHARTS = { ] }, 'open_files': { - 'options': [None, 'Open files', 'files', - 'ops', 'couchdb.open_files', 'line'], + 'options': [None, 'Open files', 'files', 'ops', 'couchdb.open_files', 'line'], 'lines': [ ['couchdb_open_os_files', '# files', 'absolute'] ] }, 'active_tasks': { - 'options': [None, 'Active task breakdown', 'tasks', - 'ops', 'couchdb.active_tasks', 'stacked'], + 'options': [None, 'Active task breakdown', 'tasks', 'ops', 'couchdb.active_tasks', 'stacked'], 'lines': [ ['activetasks_indexer', 'Indexer', 'absolute'], ['activetasks_database_compaction', 'DB Compaction', 'absolute'], @@ -168,8 +166,7 @@ CHARTS = { ] }, 'replicator_jobs': { - 'options': [None, 'Replicator job breakdown', 'jobs', - 'ops', 'couchdb.replicator_jobs', 'stacked'], + 'options': [None, 'Replicator job breakdown', 'jobs', 'ops', 'couchdb.replicator_jobs', 'stacked'], 'lines': [ ['couch_replicator_jobs_running', 'Running', 'absolute'], ['couch_replicator_jobs_pending', 'Pending', 'absolute'], @@ -179,8 +176,7 @@ CHARTS = { ] }, 'erlang_memory': { - 'options': [None, 'Erlang VM memory usage', 'bytes', - 'erlang', 'couchdb.erlang_vm_memory', 'stacked'], + 'options': [None, 'Erlang VM memory usage', 'B', 'erlang', 'couchdb.erlang_vm_memory', 'stacked'], 'lines': [ ['memory_atom', 'atom', 'absolute'], ['memory_binary', 'binaries', 'absolute'], @@ -191,23 +187,20 @@ CHARTS = { ] }, 'erlang_reductions': { - 'options': [None, 'Erlang reductions', 'count', - 'erlang', 'couchdb.reductions', 'line'], + 'options': [None, 'Erlang reductions', 'count', 'erlang', 'couchdb.reductions', 'line'], 'lines': [ ['reductions', 'reductions', 'incremental'] ] }, 'erlang_proc_counts': { - 'options': [None, 'Process counts', 'count', - 'erlang', 'couchdb.proccounts', 'line'], + 'options': [None, 'Process counts', 'count', 'erlang', 'couchdb.proccounts', 'line'], 'lines': [ ['os_proc_count', 'OS procs', 'absolute'], ['process_count', 'erl procs', 'absolute'] ] }, 'erlang_peak_msg_queue': { - 'options': [None, 'Peak message queue size', 'count', - 'erlang', 'couchdb.peakmsgqueue', + 'options': [None, 'Peak message queue size', 'count', 'erlang', 'couchdb.peakmsgqueue', 'line'], 'lines': [ ['peak_msg_queue', 'peak size', 'absolute'] @@ -215,18 +208,15 @@ CHARTS = { }, # Lines for the following are added as part of check() 'db_sizes_file': { - 'options': [None, 'Database sizes (file)', 'KB', - 'perdbstats', 'couchdb.db_sizes_file', 'line'], + 'options': [None, 'Database sizes (file)', 'KiB', 'perdbstats', 'couchdb.db_sizes_file', 'line'], 'lines': [] }, 'db_sizes_external': { - 'options': [None, 'Database sizes (external)', 'KB', - 'perdbstats', 'couchdb.db_sizes_external', 'line'], + 'options': [None, 'Database sizes (external)', 'KiB', 'perdbstats', 'couchdb.db_sizes_external', 'line'], 'lines': [] }, 'db_sizes_active': { - 'options': [None, 'Database sizes (active)', 'KB', - 'perdbstats', 'couchdb.db_sizes_active', 'line'], + 'options': [None, 'Database sizes (active)', 'KiB', 'perdbstats', 'couchdb.db_sizes_active', 'line'], 'lines': [] }, 'db_doc_counts': { @@ -235,8 +225,7 @@ CHARTS = { 'lines': [] }, 'db_doc_del_counts': { - 'options': [None, 'Database # of deleted docs', 'docs', - 'perdbstats', 'couchdb_db_doc_del_count', 'line'], + 'options': [None, 'Database # of deleted docs', 'docs', 'perdbstats', 'couchdb_db_doc_del_count', 'line'], 'lines': [] } } @@ -256,7 +245,7 @@ class Service(UrlService): try: self.dbs = self.configuration.get('databases').split(' ') except (KeyError, AttributeError): - self.dbs = [] + self.dbs = list() def check(self): if not (self.host and self.port): diff --git a/collectors/python.d.plugin/couchdb/couchdb.conf b/collectors/python.d.plugin/couchdb/couchdb.conf index 5f6e75cff..9c68be777 100644 --- a/collectors/python.d.plugin/couchdb/couchdb.conf +++ b/collectors/python.d.plugin/couchdb/couchdb.conf @@ -28,11 +28,9 @@ update_every: 10 # If unset, the default for python.d.plugin is used. # priority: 60000 -# retries sets the number of retries to be made in case of failures. -# If unset, the default for python.d.plugin is used. -# Attempts to restore the service are made once every update_every -# and only if the module has collected values in the past. -# retries: 60 +# penalty indicates whether to apply penalty to update_every in case of failures. +# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes. +# penalty: yes # autodetection_retry sets the job re-check interval in seconds. # The job is not deleted if check fails. @@ -59,7 +57,7 @@ update_every: 10 # # JOBs sharing a name are mutually exclusive # update_every: 1 # the JOB's data collection frequency # priority: 60000 # the JOB's order on the dashboard -# retries: 60 # the JOB's number of restoration attempts +# penalty: yes # the JOB's penalty # autodetection_retry: 0 # the JOB's re-check interval in seconds # # Additionally to the above, the couchdb plugin also supports the following: -- cgit v1.2.3