summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/couchdb
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:45:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:45:55 +0000
commita8220ab2d293bb7f4b014b79d16b2fb05090fa93 (patch)
tree77f0a30f016c0925cf7ee9292e644bba183c2774 /collectors/python.d.plugin/couchdb
parentAdding upstream version 1.19.0. (diff)
downloadnetdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.tar.xz
netdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.zip
Adding upstream version 1.29.0.upstream/1.29.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/python.d.plugin/couchdb')
-rw-r--r--collectors/python.d.plugin/couchdb/README.md18
-rw-r--r--collectors/python.d.plugin/couchdb/couchdb.chart.py24
2 files changed, 27 insertions, 15 deletions
diff --git a/collectors/python.d.plugin/couchdb/README.md b/collectors/python.d.plugin/couchdb/README.md
index 28897067..896bbdd3 100644
--- a/collectors/python.d.plugin/couchdb/README.md
+++ b/collectors/python.d.plugin/couchdb/README.md
@@ -1,6 +1,12 @@
-# couchdb
+<!--
+title: "Apache CouchDB monitoring with Netdata"
+custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/couchdb/README.md
+sidebar_label: "CouchDB"
+-->
-This module monitors vital statistics of a local Apache CouchDB 2.x server, including:
+# Apache CouchDB monitoring with Netdata
+
+Monitors vital statistics of a local Apache CouchDB 2.x server, including:
- Overall server reads/writes
- HTTP traffic breakdown
@@ -13,6 +19,14 @@ This module monitors vital statistics of a local Apache CouchDB 2.x server, incl
## Configuration
+Edit the `python.d/couchdb.conf` configuration file using `edit-config` from the Netdata [config
+directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`.
+
+```bash
+cd /etc/netdata # Replace this path with your Netdata config directory, if different
+sudo ./edit-config python.d/couchdb.conf
+```
+
Sample for a local server running on port 5984:
```yaml
diff --git a/collectors/python.d.plugin/couchdb/couchdb.chart.py b/collectors/python.d.plugin/couchdb/couchdb.chart.py
index 50fe6669..a395f356 100644
--- a/collectors/python.d.plugin/couchdb/couchdb.chart.py
+++ b/collectors/python.d.plugin/couchdb/couchdb.chart.py
@@ -6,8 +6,8 @@
from collections import namedtuple, defaultdict
from json import loads
-from threading import Thread
from socket import gethostbyname, gaierror
+from threading import Thread
try:
from queue import Queue
@@ -16,10 +16,8 @@ except ImportError:
from bases.FrameworkServices.UrlService import UrlService
-
update_every = 1
-
METHODS = namedtuple('METHODS', ['get_data', 'url', 'stats'])
OVERVIEW_STATS = [
@@ -127,7 +125,7 @@ CHARTS = {
['couchdb_httpd_request_methods_GET', 'GET', 'incremental'],
['couchdb_httpd_request_methods_HEAD', 'HEAD', 'incremental'],
['couchdb_httpd_request_methods_OPTIONS', 'OPTIONS',
- 'incremental'],
+ 'incremental'],
['couchdb_httpd_request_methods_POST', 'POST', 'incremental'],
['couchdb_httpd_request_methods_PUT', 'PUT', 'incremental']
]
@@ -141,13 +139,13 @@ CHARTS = {
['couchdb_httpd_status_codes_201', '201 Created', 'incremental'],
['couchdb_httpd_status_codes_202', '202 Accepted', 'incremental'],
['couchdb_httpd_status_codes_2xx', 'Other 2xx Success',
- 'incremental'],
+ 'incremental'],
['couchdb_httpd_status_codes_3xx', '3xx Redirection',
- 'incremental'],
+ 'incremental'],
['couchdb_httpd_status_codes_4xx', '4xx Client error',
- 'incremental'],
+ 'incremental'],
['couchdb_httpd_status_codes_5xx', '5xx Server error',
- 'incremental']
+ 'incremental']
]
},
'open_files': {
@@ -280,19 +278,19 @@ class Service(UrlService):
if self._get_raw_data(self.url + '/' + db)]
for db in self.dbs:
self.definitions['db_sizes_file']['lines'].append(
- ['db_'+db+'_sizes_file', db, 'absolute', 1, 1000]
+ ['db_' + db + '_sizes_file', db, 'absolute', 1, 1000]
)
self.definitions['db_sizes_external']['lines'].append(
- ['db_'+db+'_sizes_external', db, 'absolute', 1, 1000]
+ ['db_' + db + '_sizes_external', db, 'absolute', 1, 1000]
)
self.definitions['db_sizes_active']['lines'].append(
- ['db_'+db+'_sizes_active', db, 'absolute', 1, 1000]
+ ['db_' + db + '_sizes_active', db, 'absolute', 1, 1000]
)
self.definitions['db_doc_counts']['lines'].append(
- ['db_'+db+'_doc_count', db, 'absolute']
+ ['db_' + db + '_doc_count', db, 'absolute']
)
self.definitions['db_doc_del_counts']['lines'].append(
- ['db_'+db+'_doc_del_count', db, 'absolute']
+ ['db_' + db + '_doc_del_count', db, 'absolute']
)
return UrlService.check(self)