summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/mongodb
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/mongodb
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/mongodb')
-rw-r--r--collectors/python.d.plugin/mongodb/README.md24
-rw-r--r--collectors/python.d.plugin/mongodb/mongodb.chart.py2
2 files changed, 20 insertions, 6 deletions
diff --git a/collectors/python.d.plugin/mongodb/README.md b/collectors/python.d.plugin/mongodb/README.md
index fd694c1e5..c0df123d7 100644
--- a/collectors/python.d.plugin/mongodb/README.md
+++ b/collectors/python.d.plugin/mongodb/README.md
@@ -1,8 +1,14 @@
-# mongodb
+<!--
+title: "MongoDB monitoring with Netdata"
+custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/mongodb/README.md
+sidebar_label: "MongoDB"
+-->
-Module monitor mongodb performance and health metrics
+# MongoDB monitoring with Netdata
-**Requirements:**
+Monitors performance and health metrics of MongoDB.
+
+## Requirements
- `python-pymongo` package v2.4+.
@@ -74,7 +80,7 @@ Number of charts depends on mongodb version, storage engine and other features (
13. **Cache metrics** (WiredTiger):
- percentage of bytes currently in the cache (amount of space taken by cached data)
- - percantage of tracked dirty bytes in the cache (amount of space taken by dirty data)
+ - percentage of tracked dirty bytes in the cache (amount of space taken by dirty data)
14. **Pages evicted from cache** (WiredTiger):
@@ -175,7 +181,15 @@ db.createUser({
})
```
-### configuration
+## Configuration
+
+Edit the `python.d/mongodb.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/mongodb.conf
+```
Sample:
diff --git a/collectors/python.d.plugin/mongodb/mongodb.chart.py b/collectors/python.d.plugin/mongodb/mongodb.chart.py
index 0dbe82ff9..2e6fb220a 100644
--- a/collectors/python.d.plugin/mongodb/mongodb.chart.py
+++ b/collectors/python.d.plugin/mongodb/mongodb.chart.py
@@ -12,13 +12,13 @@ from sys import exc_info
try:
from pymongo import MongoClient, ASCENDING, DESCENDING
from pymongo.errors import PyMongoError
+
PYMONGO = True
except ImportError:
PYMONGO = False
from bases.FrameworkServices.SimpleService import SimpleService
-
REPL_SET_STATES = [
('1', 'primary'),
('8', 'down'),