diff options
Diffstat (limited to '')
l--------- | src/go/plugin/go.d/modules/mongodb/README.md (renamed from src/go/collectors/go.d.plugin/modules/mongodb/README.md) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/charts.go (renamed from src/go/collectors/go.d.plugin/modules/mongodb/charts.go) | 2 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/client.go (renamed from src/go/collectors/go.d.plugin/modules/mongodb/client.go) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/collect.go (renamed from src/go/collectors/go.d.plugin/modules/mongodb/collect.go) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/collect_dbstats.go (renamed from src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go) | 2 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/collect_replsetgetstatus.go (renamed from src/go/collectors/go.d.plugin/modules/mongodb/collect_replsetgetstatus.go) | 2 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/collect_serverstatus.go (renamed from src/go/collectors/go.d.plugin/modules/mongodb/collect_serverstatus.go) | 4 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/collect_sharding.go (renamed from src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go) | 2 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/config_schema.json (renamed from src/go/collectors/go.d.plugin/modules/mongodb/config_schema.json) | 4 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/documents.go (renamed from src/go/collectors/go.d.plugin/modules/mongodb/documents.go) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/init.go (renamed from src/go/collectors/go.d.plugin/modules/mongodb/init.go) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/integrations/mongodb.md (renamed from src/go/collectors/go.d.plugin/modules/mongodb/integrations/mongodb.md) | 39 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/metadata.yaml (renamed from src/go/collectors/go.d.plugin/modules/mongodb/metadata.yaml) | 2 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/mongodb.go (renamed from src/go/collectors/go.d.plugin/modules/mongodb/mongodb.go) | 6 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/mongodb_test.go (renamed from src/go/collectors/go.d.plugin/modules/mongodb/mongodb_test.go) | 4 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/testdata/config.json (renamed from src/go/collectors/go.d.plugin/modules/mongodb/testdata/config.json) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/testdata/config.yaml (renamed from src/go/collectors/go.d.plugin/modules/mongodb/testdata/config.yaml) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/testdata/v6.0.3/dbStats.json (renamed from src/go/collectors/go.d.plugin/modules/mongodb/testdata/v6.0.3/dbStats.json) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/testdata/v6.0.3/mongod-serverStatus.json (renamed from src/go/collectors/go.d.plugin/modules/mongodb/testdata/v6.0.3/mongod-serverStatus.json) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/testdata/v6.0.3/mongos-serverStatus.json (renamed from src/go/collectors/go.d.plugin/modules/mongodb/testdata/v6.0.3/mongos-serverStatus.json) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/mongodb/testdata/v6.0.3/replSetGetStatus.json (renamed from src/go/collectors/go.d.plugin/modules/mongodb/testdata/v6.0.3/replSetGetStatus.json) | 0 |
21 files changed, 51 insertions, 16 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/README.md b/src/go/plugin/go.d/modules/mongodb/README.md index a28253054..a28253054 120000 --- a/src/go/collectors/go.d.plugin/modules/mongodb/README.md +++ b/src/go/plugin/go.d/modules/mongodb/README.md diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/charts.go b/src/go/plugin/go.d/modules/mongodb/charts.go index f1b9c1a07..af9dfcefc 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/charts.go +++ b/src/go/plugin/go.d/modules/mongodb/charts.go @@ -3,7 +3,7 @@ package mongo import ( - "github.com/netdata/netdata/go/go.d.plugin/agent/module" + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" ) const ( diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/client.go b/src/go/plugin/go.d/modules/mongodb/client.go index eb36fa8ac..eb36fa8ac 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/client.go +++ b/src/go/plugin/go.d/modules/mongodb/client.go diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/collect.go b/src/go/plugin/go.d/modules/mongodb/collect.go index 232145de3..232145de3 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/collect.go +++ b/src/go/plugin/go.d/modules/mongodb/collect.go diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go b/src/go/plugin/go.d/modules/mongodb/collect_dbstats.go index edd7077e1..3a20bee7f 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/collect_dbstats.go +++ b/src/go/plugin/go.d/modules/mongodb/collect_dbstats.go @@ -6,7 +6,7 @@ import ( "fmt" "strings" - "github.com/netdata/netdata/go/go.d.plugin/agent/module" + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" ) func (m *Mongo) collectDbStats(mx map[string]int64) error { diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/collect_replsetgetstatus.go b/src/go/plugin/go.d/modules/mongodb/collect_replsetgetstatus.go index 235e8900e..43d4168db 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/collect_replsetgetstatus.go +++ b/src/go/plugin/go.d/modules/mongodb/collect_replsetgetstatus.go @@ -6,7 +6,7 @@ import ( "fmt" "strings" - "github.com/netdata/netdata/go/go.d.plugin/agent/module" + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" ) // https://www.mongodb.com/docs/manual/reference/replica-states/#replica-set-member-states diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/collect_serverstatus.go b/src/go/plugin/go.d/modules/mongodb/collect_serverstatus.go index 33fd86b76..861726386 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/collect_serverstatus.go +++ b/src/go/plugin/go.d/modules/mongodb/collect_serverstatus.go @@ -6,8 +6,8 @@ import ( "fmt" "reflect" - "github.com/netdata/netdata/go/go.d.plugin/agent/module" - "github.com/netdata/netdata/go/go.d.plugin/pkg/stm" + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/stm" ) // collectServerStatus creates the map[string]int64 for the available dims. diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go b/src/go/plugin/go.d/modules/mongodb/collect_sharding.go index 175004d34..43e9ae8bd 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/collect_sharding.go +++ b/src/go/plugin/go.d/modules/mongodb/collect_sharding.go @@ -6,7 +6,7 @@ import ( "fmt" "strings" - "github.com/netdata/netdata/go/go.d.plugin/agent/module" + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" ) func (m *Mongo) collectSharding(mx map[string]int64) error { diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/config_schema.json b/src/go/plugin/go.d/modules/mongodb/config_schema.json index 406468189..fc5c42eff 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/config_schema.json +++ b/src/go/plugin/go.d/modules/mongodb/config_schema.json @@ -34,7 +34,7 @@ "properties": { "includes": { "title": "Include", - "description": "Include databases that match any of the specified include [patterns](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#readme).", + "description": "Include databases that match any of the specified include [patterns](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/matcher#readme).", "type": [ "array", "null" @@ -47,7 +47,7 @@ }, "excludes": { "title": "Exclude", - "description": "Exclude databases that match any of the specified exclude [patterns](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#readme).", + "description": "Exclude databases that match any of the specified exclude [patterns](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/matcher#readme).", "type": [ "array", "null" diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/documents.go b/src/go/plugin/go.d/modules/mongodb/documents.go index 5c95e952e..5c95e952e 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/documents.go +++ b/src/go/plugin/go.d/modules/mongodb/documents.go diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/init.go b/src/go/plugin/go.d/modules/mongodb/init.go index b881e8711..b881e8711 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/init.go +++ b/src/go/plugin/go.d/modules/mongodb/init.go diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/integrations/mongodb.md b/src/go/plugin/go.d/modules/mongodb/integrations/mongodb.md index ce72671ce..e47c3865d 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/integrations/mongodb.md +++ b/src/go/plugin/go.d/modules/mongodb/integrations/mongodb.md @@ -1,6 +1,6 @@ <!--startmeta -custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/go/collectors/go.d.plugin/modules/mongodb/README.md" -meta_yaml: "https://github.com/netdata/netdata/edit/master/src/go/collectors/go.d.plugin/modules/mongodb/metadata.yaml" +custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/modules/mongodb/README.md" +meta_yaml: "https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/modules/mongodb/metadata.yaml" sidebar_label: "MongoDB" learn_status: "Published" learn_rel_path: "Collecting Metrics/Databases" @@ -331,6 +331,8 @@ jobs: ### Debug Mode +**Important**: Debug mode is not supported for data collection jobs created via the UI using the Dyncfg feature. + To troubleshoot issues with the `mongodb` collector, run the `go.d.plugin` with the debug option enabled. The output should give you clues as to why the collector isn't working. @@ -353,4 +355,37 @@ should give you clues as to why the collector isn't working. ./go.d.plugin -d -m mongodb ``` +### Getting Logs + +If you're encountering problems with the `mongodb` collector, follow these steps to retrieve logs and identify potential issues: + +- **Run the command** specific to your system (systemd, non-systemd, or Docker container). +- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem. + +#### System with systemd + +Use the following command to view logs generated since the last Netdata service restart: + +```bash +journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep mongodb +``` + +#### System without systemd + +Locate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name: + +```bash +grep mongodb /var/log/netdata/collector.log +``` + +**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues. + +#### Docker Container + +If your Netdata runs in a Docker container named "netdata" (replace if different), use this command: + +```bash +docker logs netdata 2>&1 | grep mongodb +``` + diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/metadata.yaml b/src/go/plugin/go.d/modules/mongodb/metadata.yaml index bad65393d..ae013539f 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/metadata.yaml +++ b/src/go/plugin/go.d/modules/mongodb/metadata.yaml @@ -104,7 +104,7 @@ modules: Metrics of databases matching the selector will be collected. - Logic: (pattern1 OR pattern2) AND !(pattern3 or pattern4) - - Pattern syntax: [matcher](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#supported-format). + - Pattern syntax: [matcher](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/matcher#supported-format). - Syntax: ```yaml diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/mongodb.go b/src/go/plugin/go.d/modules/mongodb/mongodb.go index edc73f96a..7b8550251 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/mongodb.go +++ b/src/go/plugin/go.d/modules/mongodb/mongodb.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "github.com/netdata/netdata/go/go.d.plugin/agent/module" - "github.com/netdata/netdata/go/go.d.plugin/pkg/matcher" - "github.com/netdata/netdata/go/go.d.plugin/pkg/web" + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) //go:embed "config_schema.json" diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/mongodb_test.go b/src/go/plugin/go.d/modules/mongodb/mongodb_test.go index c7cf0f42b..835ea20e2 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/mongodb_test.go +++ b/src/go/plugin/go.d/modules/mongodb/mongodb_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "github.com/netdata/netdata/go/go.d.plugin/agent/module" - "github.com/netdata/netdata/go/go.d.plugin/pkg/matcher" + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/testdata/config.json b/src/go/plugin/go.d/modules/mongodb/testdata/config.json index bc3f94d81..bc3f94d81 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/testdata/config.json +++ b/src/go/plugin/go.d/modules/mongodb/testdata/config.json diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/testdata/config.yaml b/src/go/plugin/go.d/modules/mongodb/testdata/config.yaml index 03a11029c..03a11029c 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/testdata/config.yaml +++ b/src/go/plugin/go.d/modules/mongodb/testdata/config.yaml diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/testdata/v6.0.3/dbStats.json b/src/go/plugin/go.d/modules/mongodb/testdata/v6.0.3/dbStats.json index 52a513203..52a513203 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/testdata/v6.0.3/dbStats.json +++ b/src/go/plugin/go.d/modules/mongodb/testdata/v6.0.3/dbStats.json diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/testdata/v6.0.3/mongod-serverStatus.json b/src/go/plugin/go.d/modules/mongodb/testdata/v6.0.3/mongod-serverStatus.json index 77f083923..77f083923 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/testdata/v6.0.3/mongod-serverStatus.json +++ b/src/go/plugin/go.d/modules/mongodb/testdata/v6.0.3/mongod-serverStatus.json diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/testdata/v6.0.3/mongos-serverStatus.json b/src/go/plugin/go.d/modules/mongodb/testdata/v6.0.3/mongos-serverStatus.json index ecf766715..ecf766715 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/testdata/v6.0.3/mongos-serverStatus.json +++ b/src/go/plugin/go.d/modules/mongodb/testdata/v6.0.3/mongos-serverStatus.json diff --git a/src/go/collectors/go.d.plugin/modules/mongodb/testdata/v6.0.3/replSetGetStatus.json b/src/go/plugin/go.d/modules/mongodb/testdata/v6.0.3/replSetGetStatus.json index c97a77f31..c97a77f31 100644 --- a/src/go/collectors/go.d.plugin/modules/mongodb/testdata/v6.0.3/replSetGetStatus.json +++ b/src/go/plugin/go.d/modules/mongodb/testdata/v6.0.3/replSetGetStatus.json |