diff options
Diffstat (limited to '')
l--------- | src/go/plugin/go.d/modules/coredns/README.md (renamed from src/go/collectors/go.d.plugin/modules/coredns/README.md) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/charts.go (renamed from src/go/collectors/go.d.plugin/modules/coredns/charts.go) | 2 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/collect.go (renamed from src/go/collectors/go.d.plugin/modules/coredns/collect.go) | 4 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/config_schema.json (renamed from src/go/collectors/go.d.plugin/modules/coredns/config_schema.json) | 14 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/coredns.go (renamed from src/go/collectors/go.d.plugin/modules/coredns/coredns.go) | 8 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/coredns_test.go (renamed from src/go/collectors/go.d.plugin/modules/coredns/coredns_test.go) | 2 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/init.go (renamed from src/go/collectors/go.d.plugin/modules/coredns/init.go) | 6 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/integrations/coredns.md (renamed from src/go/collectors/go.d.plugin/modules/coredns/integrations/coredns.md) | 43 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/metadata.yaml (renamed from src/go/collectors/go.d.plugin/modules/coredns/metadata.yaml) | 4 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/metrics.go (renamed from src/go/collectors/go.d.plugin/modules/coredns/metrics.go) | 2 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/testdata/config.json (renamed from src/go/collectors/go.d.plugin/modules/coredns/testdata/config.json) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/testdata/config.yaml (renamed from src/go/collectors/go.d.plugin/modules/coredns/testdata/config.yaml) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/testdata/no_version/no_load.txt (renamed from src/go/collectors/go.d.plugin/modules/coredns/testdata/no_version/no_load.txt) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/testdata/version169/no_load.txt (renamed from src/go/collectors/go.d.plugin/modules/coredns/testdata/version169/no_load.txt) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/testdata/version169/some_load.txt (renamed from src/go/collectors/go.d.plugin/modules/coredns/testdata/version169/some_load.txt) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/testdata/version170/no_load.txt (renamed from src/go/collectors/go.d.plugin/modules/coredns/testdata/version170/no_load.txt) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/coredns/testdata/version170/some_load.txt (renamed from src/go/collectors/go.d.plugin/modules/coredns/testdata/version170/some_load.txt) | 0 |
17 files changed, 63 insertions, 22 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/coredns/README.md b/src/go/plugin/go.d/modules/coredns/README.md index fcd7e5544..fcd7e5544 120000 --- a/src/go/collectors/go.d.plugin/modules/coredns/README.md +++ b/src/go/plugin/go.d/modules/coredns/README.md diff --git a/src/go/collectors/go.d.plugin/modules/coredns/charts.go b/src/go/plugin/go.d/modules/coredns/charts.go index fecc1736e..fd93efad3 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/charts.go +++ b/src/go/plugin/go.d/modules/coredns/charts.go @@ -2,7 +2,7 @@ package coredns -import "github.com/netdata/netdata/go/go.d.plugin/agent/module" +import "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" type ( // Charts is an alias for module.Charts diff --git a/src/go/collectors/go.d.plugin/modules/coredns/collect.go b/src/go/plugin/go.d/modules/coredns/collect.go index b77f9a29c..d6137b181 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/collect.go +++ b/src/go/plugin/go.d/modules/coredns/collect.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/blang/semver/v4" - "github.com/netdata/netdata/go/go.d.plugin/pkg/prometheus" - "github.com/netdata/netdata/go/go.d.plugin/pkg/stm" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/prometheus" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/stm" ) const ( diff --git a/src/go/collectors/go.d.plugin/modules/coredns/config_schema.json b/src/go/plugin/go.d/modules/coredns/config_schema.json index 77134298b..d5f87912b 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/config_schema.json +++ b/src/go/plugin/go.d/modules/coredns/config_schema.json @@ -40,7 +40,7 @@ "properties": { "includes": { "title": "Include", - "description": "Include servers whose names match any of the specified inclusion [patterns](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#readme).", + "description": "Include servers whose names match any of the specified inclusion [patterns](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/matcher#readme).", "type": [ "array", "null" @@ -53,7 +53,7 @@ }, "excludes": { "title": "Exclude", - "description": "Exclude servers whose names match any of the specified exclusion [patterns](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#readme).", + "description": "Exclude servers whose names match any of the specified exclusion [patterns](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/matcher#readme).", "type": [ "array", "null" @@ -76,7 +76,7 @@ "properties": { "includes": { "title": "Include", - "description": "Include zones whose names match any of the specified inclusion [patterns](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#readme).", + "description": "Include zones whose names match any of the specified inclusion [patterns](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/matcher#readme).", "type": [ "array", "null" @@ -89,7 +89,7 @@ }, "excludes": { "title": "Exclude", - "description": "Exclude zones whose names match any of the specified exclusion [patterns](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#readme).", + "description": "Exclude zones whose names match any of the specified exclusion [patterns](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/matcher#readme).", "type": [ "array", "null" @@ -254,6 +254,12 @@ "ui:help": "The logic for inclusion and exclusion is as follows: `(include1 OR include2) AND !(exclude1 OR exclude2)`.", "ui:collapsible": true }, + "username": { + "ui:widget": "password" + }, + "proxy_username": { + "ui:widget": "password" + }, "password": { "ui:widget": "password" }, diff --git a/src/go/collectors/go.d.plugin/modules/coredns/coredns.go b/src/go/plugin/go.d/modules/coredns/coredns.go index 669373975..c91af7d15 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/coredns.go +++ b/src/go/plugin/go.d/modules/coredns/coredns.go @@ -7,10 +7,10 @@ import ( "errors" "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/prometheus" - "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/prometheus" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" "github.com/blang/semver/v4" ) diff --git a/src/go/collectors/go.d.plugin/modules/coredns/coredns_test.go b/src/go/plugin/go.d/modules/coredns/coredns_test.go index df5dc1501..5d67b417f 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/coredns_test.go +++ b/src/go/plugin/go.d/modules/coredns/coredns_test.go @@ -8,7 +8,7 @@ import ( "os" "testing" - "github.com/netdata/netdata/go/go.d.plugin/agent/module" + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/src/go/collectors/go.d.plugin/modules/coredns/init.go b/src/go/plugin/go.d/modules/coredns/init.go index 1e3a7be5c..e2b888bb6 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/init.go +++ b/src/go/plugin/go.d/modules/coredns/init.go @@ -5,9 +5,9 @@ package coredns import ( "errors" - "github.com/netdata/netdata/go/go.d.plugin/pkg/matcher" - "github.com/netdata/netdata/go/go.d.plugin/pkg/prometheus" - "github.com/netdata/netdata/go/go.d.plugin/pkg/web" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/prometheus" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) func (cd *CoreDNS) validateConfig() error { diff --git a/src/go/collectors/go.d.plugin/modules/coredns/integrations/coredns.md b/src/go/plugin/go.d/modules/coredns/integrations/coredns.md index ef942222f..549e2d8d9 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/integrations/coredns.md +++ b/src/go/plugin/go.d/modules/coredns/integrations/coredns.md @@ -1,6 +1,6 @@ <!--startmeta -custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/go/collectors/go.d.plugin/modules/coredns/README.md" -meta_yaml: "https://github.com/netdata/netdata/edit/master/src/go/collectors/go.d.plugin/modules/coredns/metadata.yaml" +custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/modules/coredns/README.md" +meta_yaml: "https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/modules/coredns/metadata.yaml" sidebar_label: "CoreDNS" learn_status: "Published" learn_rel_path: "Collecting Metrics/DNS and DHCP Servers" @@ -177,7 +177,7 @@ The following options can be defined globally: update_every, autodetection_retry Metrics of servers 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 @@ -195,7 +195,7 @@ per_server_stats: Metrics of zones 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 @@ -269,6 +269,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 `coredns` 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. @@ -291,4 +293,37 @@ should give you clues as to why the collector isn't working. ./go.d.plugin -d -m coredns ``` +### Getting Logs + +If you're encountering problems with the `coredns` 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 coredns +``` + +#### 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 coredns /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 coredns +``` + diff --git a/src/go/collectors/go.d.plugin/modules/coredns/metadata.yaml b/src/go/plugin/go.d/modules/coredns/metadata.yaml index 27f70fdc5..e128ab546 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/metadata.yaml +++ b/src/go/plugin/go.d/modules/coredns/metadata.yaml @@ -70,7 +70,7 @@ modules: detailed_description: | Metrics of servers 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 @@ -89,7 +89,7 @@ modules: detailed_description: | Metrics of zones 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/coredns/metrics.go b/src/go/plugin/go.d/modules/coredns/metrics.go index 1c72041bf..5929fdbf6 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/metrics.go +++ b/src/go/plugin/go.d/modules/coredns/metrics.go @@ -3,7 +3,7 @@ package coredns import ( - mtx "github.com/netdata/netdata/go/go.d.plugin/pkg/metrics" + mtx "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/metrics" ) func newMetrics() *metrics { diff --git a/src/go/collectors/go.d.plugin/modules/coredns/testdata/config.json b/src/go/plugin/go.d/modules/coredns/testdata/config.json index 2dc54a1a2..2dc54a1a2 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/testdata/config.json +++ b/src/go/plugin/go.d/modules/coredns/testdata/config.json diff --git a/src/go/collectors/go.d.plugin/modules/coredns/testdata/config.yaml b/src/go/plugin/go.d/modules/coredns/testdata/config.yaml index be474167f..be474167f 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/testdata/config.yaml +++ b/src/go/plugin/go.d/modules/coredns/testdata/config.yaml diff --git a/src/go/collectors/go.d.plugin/modules/coredns/testdata/no_version/no_load.txt b/src/go/plugin/go.d/modules/coredns/testdata/no_version/no_load.txt index f0de841f0..f0de841f0 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/testdata/no_version/no_load.txt +++ b/src/go/plugin/go.d/modules/coredns/testdata/no_version/no_load.txt diff --git a/src/go/collectors/go.d.plugin/modules/coredns/testdata/version169/no_load.txt b/src/go/plugin/go.d/modules/coredns/testdata/version169/no_load.txt index 8fee1a73c..8fee1a73c 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/testdata/version169/no_load.txt +++ b/src/go/plugin/go.d/modules/coredns/testdata/version169/no_load.txt diff --git a/src/go/collectors/go.d.plugin/modules/coredns/testdata/version169/some_load.txt b/src/go/plugin/go.d/modules/coredns/testdata/version169/some_load.txt index 15c4a57ec..15c4a57ec 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/testdata/version169/some_load.txt +++ b/src/go/plugin/go.d/modules/coredns/testdata/version169/some_load.txt diff --git a/src/go/collectors/go.d.plugin/modules/coredns/testdata/version170/no_load.txt b/src/go/plugin/go.d/modules/coredns/testdata/version170/no_load.txt index ba343ab57..ba343ab57 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/testdata/version170/no_load.txt +++ b/src/go/plugin/go.d/modules/coredns/testdata/version170/no_load.txt diff --git a/src/go/collectors/go.d.plugin/modules/coredns/testdata/version170/some_load.txt b/src/go/plugin/go.d/modules/coredns/testdata/version170/some_load.txt index 34f0a9a22..34f0a9a22 100644 --- a/src/go/collectors/go.d.plugin/modules/coredns/testdata/version170/some_load.txt +++ b/src/go/plugin/go.d/modules/coredns/testdata/version170/some_load.txt |