summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/couchdb
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--collectors/python.d.plugin/couchdb/Makefile.inc13
-rw-r--r--collectors/python.d.plugin/couchdb/README.md35
-rw-r--r--collectors/python.d.plugin/couchdb/couchdb.chart.py (renamed from python.d/couchdb.chart.py)3
-rw-r--r--collectors/python.d.plugin/couchdb/couchdb.conf (renamed from conf.d/python.d/couchdb.conf)0
4 files changed, 50 insertions, 1 deletions
diff --git a/collectors/python.d.plugin/couchdb/Makefile.inc b/collectors/python.d.plugin/couchdb/Makefile.inc
new file mode 100644
index 000000000..89dfb51c7
--- /dev/null
+++ b/collectors/python.d.plugin/couchdb/Makefile.inc
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# THIS IS NOT A COMPLETE Makefile
+# IT IS INCLUDED BY ITS PARENT'S Makefile.am
+# IT IS REQUIRED TO REFERENCE ALL FILES RELATIVE TO THE PARENT
+
+# install these files
+dist_python_DATA += couchdb/couchdb.chart.py
+dist_pythonconfig_DATA += couchdb/couchdb.conf
+
+# do not install these files, but include them in the distribution
+dist_noinst_DATA += couchdb/README.md couchdb/Makefile.inc
+
diff --git a/collectors/python.d.plugin/couchdb/README.md b/collectors/python.d.plugin/couchdb/README.md
new file mode 100644
index 000000000..eff8c0810
--- /dev/null
+++ b/collectors/python.d.plugin/couchdb/README.md
@@ -0,0 +1,35 @@
+# couchdb
+
+This module monitors vital statistics of a local Apache CouchDB 2.x server, including:
+
+* Overall server reads/writes
+* HTTP traffic breakdown
+ * Request methods (`GET`, `PUT`, `POST`, etc.)
+ * Response status codes (`200`, `201`, `4xx`, etc.)
+* Active server tasks
+* Replication status (CouchDB 2.1 and up only)
+* Erlang VM stats
+* Optional per-database statistics: sizes, # of docs, # of deleted docs
+
+### Configuration
+
+Sample for a local server running on port 5984:
+```yaml
+local:
+ user: 'admin'
+ pass: 'password'
+ node: 'couchdb@127.0.0.1'
+```
+
+Be sure to specify a correct admin-level username and password.
+
+You may also need to change the `node` name; this should match the value of `-name NODENAME` in your CouchDB's `etc/vm.args` file. Typically this is of the form `couchdb@fully.qualified.domain.name` in a cluster, or `couchdb@127.0.0.1` / `couchdb@localhost` for a single-node server.
+
+If you want per-database statistics, these need to be added to the configuration, separated by spaces:
+```yaml
+local:
+ ...
+ databases: 'db1 db2 db3 ...'
+```
+
+---
diff --git a/python.d/couchdb.chart.py b/collectors/python.d.plugin/couchdb/couchdb.chart.py
index 558bac587..5d6b9916f 100644
--- a/python.d/couchdb.chart.py
+++ b/collectors/python.d.plugin/couchdb/couchdb.chart.py
@@ -2,6 +2,7 @@
# Description: couchdb netdata python.d module
# Author: wohali <wohali@apache.org>
# Thanks to l2isbad for good examples :)
+# SPDX-License-Identifier: GPL-3.0-or-later
from collections import namedtuple, defaultdict
from json import loads
@@ -24,7 +25,7 @@ METHODS = namedtuple('METHODS', ['get_data', 'url', 'stats'])
OVERVIEW_STATS = [
'couchdb.database_reads.value',
'couchdb.database_writes.value',
- 'couchdb.httpd.view_reads.value'
+ 'couchdb.httpd.view_reads.value',
'couchdb.httpd_request_methods.COPY.value',
'couchdb.httpd_request_methods.DELETE.value',
'couchdb.httpd_request_methods.GET.value',
diff --git a/conf.d/python.d/couchdb.conf b/collectors/python.d.plugin/couchdb/couchdb.conf
index 5f6e75cff..5f6e75cff 100644
--- a/conf.d/python.d/couchdb.conf
+++ b/collectors/python.d.plugin/couchdb/couchdb.conf