diff options
Diffstat (limited to '')
l--------- | src/go/plugin/go.d/modules/k8s_kubelet/README.md (renamed from src/go/collectors/go.d.plugin/modules/k8s_kubelet/README.md) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/k8s_kubelet/charts.go (renamed from src/go/collectors/go.d.plugin/modules/k8s_kubelet/charts.go) | 2 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/k8s_kubelet/collect.go (renamed from src/go/collectors/go.d.plugin/modules/k8s_kubelet/collect.go) | 8 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/k8s_kubelet/config_schema.json (renamed from src/go/collectors/go.d.plugin/modules/k8s_kubelet/config_schema.json) | 6 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/k8s_kubelet/init.go (renamed from src/go/collectors/go.d.plugin/modules/k8s_kubelet/init.go) | 4 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/k8s_kubelet/integrations/kubelet.md (renamed from src/go/collectors/go.d.plugin/modules/k8s_kubelet/integrations/kubelet.md) | 39 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/k8s_kubelet/kubelet.go (renamed from src/go/collectors/go.d.plugin/modules/k8s_kubelet/kubelet.go) | 6 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/k8s_kubelet/kubelet_test.go (renamed from src/go/collectors/go.d.plugin/modules/k8s_kubelet/kubelet_test.go) | 2 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/k8s_kubelet/metadata.yaml (renamed from src/go/collectors/go.d.plugin/modules/k8s_kubelet/metadata.yaml) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/k8s_kubelet/metrics.go (renamed from src/go/collectors/go.d.plugin/modules/k8s_kubelet/metrics.go) | 2 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/k8s_kubelet/testdata/config.json (renamed from src/go/collectors/go.d.plugin/modules/k8s_kubelet/testdata/config.json) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/k8s_kubelet/testdata/config.yaml (renamed from src/go/collectors/go.d.plugin/modules/k8s_kubelet/testdata/config.yaml) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/k8s_kubelet/testdata/metrics.txt (renamed from src/go/collectors/go.d.plugin/modules/k8s_kubelet/testdata/metrics.txt) | 0 | ||||
-rw-r--r-- | src/go/plugin/go.d/modules/k8s_kubelet/testdata/token.txt (renamed from src/go/collectors/go.d.plugin/modules/k8s_kubelet/testdata/token.txt) | 0 |
14 files changed, 55 insertions, 14 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/README.md b/src/go/plugin/go.d/modules/k8s_kubelet/README.md index 036630b3e..036630b3e 120000 --- a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/README.md +++ b/src/go/plugin/go.d/modules/k8s_kubelet/README.md diff --git a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/charts.go b/src/go/plugin/go.d/modules/k8s_kubelet/charts.go index 564f7be58..e2848ea3e 100644 --- a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/charts.go +++ b/src/go/plugin/go.d/modules/k8s_kubelet/charts.go @@ -2,7 +2,7 @@ package k8s_kubelet -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/k8s_kubelet/collect.go b/src/go/plugin/go.d/modules/k8s_kubelet/collect.go index 350c0bf45..f014617fc 100644 --- a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/collect.go +++ b/src/go/plugin/go.d/modules/k8s_kubelet/collect.go @@ -5,11 +5,11 @@ package k8s_kubelet import ( "math" - mtx "github.com/netdata/netdata/go/go.d.plugin/pkg/metrics" - "github.com/netdata/netdata/go/go.d.plugin/pkg/prometheus" - "github.com/netdata/netdata/go/go.d.plugin/pkg/stm" + mtx "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/metrics" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/prometheus" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/stm" - "github.com/netdata/netdata/go/go.d.plugin/agent/module" + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" ) func (k *Kubelet) collect() (map[string]int64, error) { diff --git a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/config_schema.json b/src/go/plugin/go.d/modules/k8s_kubelet/config_schema.json index ffc55b837..16f9029a6 100644 --- a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/config_schema.json +++ b/src/go/plugin/go.d/modules/k8s_kubelet/config_schema.json @@ -167,6 +167,12 @@ "timeout": { "ui:help": "Accepts decimals for precise control (e.g., type 1.5 for 1.5 seconds)." }, + "username": { + "ui:widget": "password" + }, + "proxy_username": { + "ui:widget": "password" + }, "password": { "ui:widget": "password" }, diff --git a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/init.go b/src/go/plugin/go.d/modules/k8s_kubelet/init.go index 3a076160b..803cd984c 100644 --- a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/init.go +++ b/src/go/plugin/go.d/modules/k8s_kubelet/init.go @@ -6,8 +6,8 @@ import ( "errors" "os" - "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/prometheus" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) func (k *Kubelet) validateConfig() error { diff --git a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/integrations/kubelet.md b/src/go/plugin/go.d/modules/k8s_kubelet/integrations/kubelet.md index 3421b7a7a..d92f82be7 100644 --- a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/integrations/kubelet.md +++ b/src/go/plugin/go.d/modules/k8s_kubelet/integrations/kubelet.md @@ -1,6 +1,6 @@ <!--startmeta -custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/go/collectors/go.d.plugin/modules/k8s_kubelet/README.md" -meta_yaml: "https://github.com/netdata/netdata/edit/master/src/go/collectors/go.d.plugin/modules/k8s_kubelet/metadata.yaml" +custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/modules/k8s_kubelet/README.md" +meta_yaml: "https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/modules/k8s_kubelet/metadata.yaml" sidebar_label: "Kubelet" learn_status: "Published" learn_rel_path: "Collecting Metrics/Kubernetes" @@ -194,6 +194,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 `k8s_kubelet` 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. @@ -216,4 +218,37 @@ should give you clues as to why the collector isn't working. ./go.d.plugin -d -m k8s_kubelet ``` +### Getting Logs + +If you're encountering problems with the `k8s_kubelet` 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 k8s_kubelet +``` + +#### 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 k8s_kubelet /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 k8s_kubelet +``` + diff --git a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/kubelet.go b/src/go/plugin/go.d/modules/k8s_kubelet/kubelet.go index 271950ad1..19fb9dd9e 100644 --- a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/kubelet.go +++ b/src/go/plugin/go.d/modules/k8s_kubelet/kubelet.go @@ -7,9 +7,9 @@ import ( "errors" "time" - "github.com/netdata/netdata/go/go.d.plugin/agent/module" - "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/prometheus" + "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/k8s_kubelet/kubelet_test.go b/src/go/plugin/go.d/modules/k8s_kubelet/kubelet_test.go index d4f216908..d55ee31a3 100644 --- a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/kubelet_test.go +++ b/src/go/plugin/go.d/modules/k8s_kubelet/kubelet_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/k8s_kubelet/metadata.yaml b/src/go/plugin/go.d/modules/k8s_kubelet/metadata.yaml index 0d5229bb5..0d5229bb5 100644 --- a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/metadata.yaml +++ b/src/go/plugin/go.d/modules/k8s_kubelet/metadata.yaml diff --git a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/metrics.go b/src/go/plugin/go.d/modules/k8s_kubelet/metrics.go index 15867b975..f8a4c5c57 100644 --- a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/metrics.go +++ b/src/go/plugin/go.d/modules/k8s_kubelet/metrics.go @@ -3,7 +3,7 @@ package k8s_kubelet 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/k8s_kubelet/testdata/config.json b/src/go/plugin/go.d/modules/k8s_kubelet/testdata/config.json index d85483953..d85483953 100644 --- a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/testdata/config.json +++ b/src/go/plugin/go.d/modules/k8s_kubelet/testdata/config.json diff --git a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/testdata/config.yaml b/src/go/plugin/go.d/modules/k8s_kubelet/testdata/config.yaml index 9e4f3fdc4..9e4f3fdc4 100644 --- a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/testdata/config.yaml +++ b/src/go/plugin/go.d/modules/k8s_kubelet/testdata/config.yaml diff --git a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/testdata/metrics.txt b/src/go/plugin/go.d/modules/k8s_kubelet/testdata/metrics.txt index 47b63bd55..47b63bd55 100644 --- a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/testdata/metrics.txt +++ b/src/go/plugin/go.d/modules/k8s_kubelet/testdata/metrics.txt diff --git a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/testdata/token.txt b/src/go/plugin/go.d/modules/k8s_kubelet/testdata/token.txt index e769c538e..e769c538e 100644 --- a/src/go/collectors/go.d.plugin/modules/k8s_kubelet/testdata/token.txt +++ b/src/go/plugin/go.d/modules/k8s_kubelet/testdata/token.txt |