summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2024-03-29 14:29:13 +0200
committerGitHub <noreply@github.com>2024-03-29 14:29:13 +0200
commitd39c204579caf020aaf9c82fabdd40abca3a5f31 (patch)
treeb6e3741b7afae671541f7a76f7d0609b507347c2
parent90b2860fcdb0d0ec0a2f9ea59725299323e7a948 (diff)
go.d: don't create jobs with unknown module (#17289)
-rw-r--r--src/go/collectors/go.d.plugin/agent/jobmgr/manager.go2
-rw-r--r--src/go/collectors/go.d.plugin/config/go.d/sd/net_listeners.conf4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/go/collectors/go.d.plugin/agent/jobmgr/manager.go b/src/go/collectors/go.d.plugin/agent/jobmgr/manager.go
index e3876cf4ac..f4d55fcf6d 100644
--- a/src/go/collectors/go.d.plugin/agent/jobmgr/manager.go
+++ b/src/go/collectors/go.d.plugin/agent/jobmgr/manager.go
@@ -152,7 +152,7 @@ func (m *Manager) run() {
}
func (m *Manager) addConfig(cfg confgroup.Config) {
- if cfg.Module() == "" {
+ if _, ok := m.Modules.Lookup(cfg.Module()); !ok {
return
}
diff --git a/src/go/collectors/go.d.plugin/config/go.d/sd/net_listeners.conf b/src/go/collectors/go.d.plugin/config/go.d/sd/net_listeners.conf
index be5b302890..7f3c93f768 100644
--- a/src/go/collectors/go.d.plugin/config/go.d/sd/net_listeners.conf
+++ b/src/go/collectors/go.d.plugin/config/go.d/sd/net_listeners.conf
@@ -238,7 +238,7 @@ compose:
url: http://{{.Address}}/jmx
- selector: "kubelet"
template: |
- module: kubelet
+ module: k8s_kubelet
name: local
{{- if eq .Port "10255" }}
url: http://{{.Address}}/metrics
@@ -248,7 +248,7 @@ compose:
{{- end }}
- selector: "kubeproxy"
template: |
- module: kubeproxy
+ module: k8s_kubeproxy
name: local
url: http://{{.Address}}/metrics
- selector: "lighttpd"