summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2024-03-07 14:14:18 +0200
committerGitHub <noreply@github.com>2024-03-07 14:14:18 +0200
commit7add1121d2e14f9f61a6c88fb483943402aca300 (patch)
tree25d12325369cf7624daad9080dfff7d5c6dbff35
parent8e446dc58575757e529d91d4a64b68beeb2f98bb (diff)
improve go.d.plugin dyncfg config schemas (#17124)
-rw-r--r--src/go/collectors/go.d.plugin/agent/functions/manager.go4
-rw-r--r--src/go/collectors/go.d.plugin/modules/activemq/config_schema.json15
-rw-r--r--src/go/collectors/go.d.plugin/modules/apache/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/bind/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/cassandra/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/cockroachdb/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/consul/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/coredns/config_schema.json84
-rw-r--r--src/go/collectors/go.d.plugin/modules/couchbase/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/couchdb/config_schema.json11
-rw-r--r--src/go/collectors/go.d.plugin/modules/dnsdist/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/dnsquery/config_schema.json6
-rw-r--r--src/go/collectors/go.d.plugin/modules/docker_engine/config_schema.json15
-rw-r--r--src/go/collectors/go.d.plugin/modules/dockerhub/config_schema.json28
-rw-r--r--src/go/collectors/go.d.plugin/modules/elasticsearch/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/envoy/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/filecheck/config_schema.json38
-rw-r--r--src/go/collectors/go.d.plugin/modules/fluentd/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/geth/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/haproxy/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/hdfs/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/httpcheck/config_schema.json16
-rw-r--r--src/go/collectors/go.d.plugin/modules/isc_dhcpd/config_schema.json7
-rw-r--r--src/go/collectors/go.d.plugin/modules/k8s_kubelet/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/k8s_kubeproxy/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/lighttpd/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/logstash/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/mongodb/config_schema.json3
-rw-r--r--src/go/collectors/go.d.plugin/modules/mysql/config_schema.json8
-rw-r--r--src/go/collectors/go.d.plugin/modules/nginx/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/nginxplus/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/nginxvts/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/openvpn_status_log/config_schema.json3
-rw-r--r--src/go/collectors/go.d.plugin/modules/pgbouncer/config_schema.json10
-rw-r--r--src/go/collectors/go.d.plugin/modules/phpdaemon/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/pihole/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/pika/config_schema.json12
-rw-r--r--src/go/collectors/go.d.plugin/modules/ping/config_schema.json2
-rw-r--r--src/go/collectors/go.d.plugin/modules/portcheck/config_schema.json16
-rw-r--r--src/go/collectors/go.d.plugin/modules/postgres/config_schema.json5
-rw-r--r--src/go/collectors/go.d.plugin/modules/powerdns/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/powerdns_recursor/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/prometheus/config_schema.json11
-rw-r--r--src/go/collectors/go.d.plugin/modules/proxysql/config_schema.json3
-rw-r--r--src/go/collectors/go.d.plugin/modules/pulsar/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/rabbitmq/config_schema.json13
-rw-r--r--src/go/collectors/go.d.plugin/modules/redis/config_schema.json3
-rw-r--r--src/go/collectors/go.d.plugin/modules/scaleio/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/snmp/config_schema.json28
-rw-r--r--src/go/collectors/go.d.plugin/modules/squidlog/config_schema.json3
-rw-r--r--src/go/collectors/go.d.plugin/modules/tengine/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/traefik/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/unbound/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/vcsa/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/vernemq/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/vsphere/config_schema.json19
-rw-r--r--src/go/collectors/go.d.plugin/modules/weblog/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/whoisquery/config_schema.json3
-rw-r--r--src/go/collectors/go.d.plugin/modules/windows/config_schema.json9
-rw-r--r--src/go/collectors/go.d.plugin/modules/x509check/config_schema.json15
-rw-r--r--src/go/collectors/go.d.plugin/modules/zookeeper/config_schema.json9
62 files changed, 494 insertions, 202 deletions
diff --git a/src/go/collectors/go.d.plugin/agent/functions/manager.go b/src/go/collectors/go.d.plugin/agent/functions/manager.go
index 1537c21b27..365d0670b5 100644
--- a/src/go/collectors/go.d.plugin/agent/functions/manager.go
+++ b/src/go/collectors/go.d.plugin/agent/functions/manager.go
@@ -51,8 +51,6 @@ func (m *Manager) Run(ctx context.Context) {
defer func() { m.Info("instance is stopped") }()
if !isTerminal {
- var wg sync.WaitGroup
-
r, err := cancelreader.NewReader(m.Input)
if err != nil {
m.Errorf("fail to create cancel reader: %v", err)
@@ -61,6 +59,8 @@ func (m *Manager) Run(ctx context.Context) {
go func() { <-ctx.Done(); r.Cancel() }()
+ var wg sync.WaitGroup
+
wg.Add(1)
go func() { defer wg.Done(); m.run(r) }()
diff --git a/src/go/collectors/go.d.plugin/modules/activemq/config_schema.json b/src/go/collectors/go.d.plugin/modules/activemq/config_schema.json
index 3eb9715f73..ccef5a804b 100644
--- a/src/go/collectors/go.d.plugin/modules/activemq/config_schema.json
+++ b/src/go/collectors/go.d.plugin/modules/activemq/config_schema.json
@@ -109,17 +109,20 @@
"tls_ca": {
"title": "TLS CA",
"description": "The path to the CA certificate file for TLS verification.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_cert": {
"title": "TLS certificate",
"description": "The path to the client certificate file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_key": {
"title": "TLS key",
"description": "The path to the client key file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
}
},
"required": [
@@ -188,6 +191,12 @@
"timeout": {
"ui:help": "Accepts decimals for precise control (e.g., type 1.5 for 1.5 seconds)."
},
+ "queues_filter": {
+ "ui:help": "Use `*` to collect all queues. To exclude all queues from collection, use `!*`."
+ },
+ "topics_filter": {
+ "ui:help": "Use `*` to collect all topics. To exclude all topics from collection, use `!*`."
+ },
"password": {
"ui:widget": "password"
},
diff --git a/src/go/collectors/go.d.plugin/modules/apache/config_schema.json b/src/go/collectors/go.d.plugin/modules/apache/config_schema.json
index 50e9c418e1..809dae1b11 100644
--- a/src/go/collectors/go.d.plugin/modules/apache/config_schema.json
+++ b/src/go/collectors/go.d.plugin/modules/apache/config_schema.json
@@ -75,17 +75,20 @@
"tls_ca": {
"title": "TLS CA",
"description": "The path to the CA certificate file for TLS verification.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_cert": {
"title": "TLS certificate",
"description": "The path to the client certificate file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_key": {
"title": "TLS key",
"description": "The path to the client key file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
}
},
"required": [
diff --git a/src/go/collectors/go.d.plugin/modules/bind/config_schema.json b/src/go/collectors/go.d.plugin/modules/bind/config_schema.json
index 1b5409c7bd..d4d32852cd 100644
--- a/src/go/collectors/go.d.plugin/modules/bind/config_schema.json
+++ b/src/go/collectors/go.d.plugin/modules/bind/config_schema.json
@@ -75,17 +75,20 @@
"tls_ca": {
"title": "TLS CA",
"description": "The path to the CA certificate file for TLS verification.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_cert": {
"title": "TLS certificate",
"description": "The path to the client certificate file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_key": {
"title": "TLS key",
"description": "The path to the client key file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
}
},
"required": [
diff --git a/src/go/collectors/go.d.plugin/modules/cassandra/config_schema.json b/src/go/collectors/go.d.plugin/modules/cassandra/config_schema.json
index 2cac98e3fd..b1ded50baa 100644
--- a/src/go/collectors/go.d.plugin/modules/cassandra/config_schema.json
+++ b/src/go/collectors/go.d.plugin/modules/cassandra/config_schema.json
@@ -75,17 +75,20 @@
"tls_ca": {
"title": "TLS CA",
"description": "The path to the CA certificate file for TLS verification.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_cert": {
"title": "TLS certificate",
"description": "The path to the client certificate file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_key": {
"title": "TLS key",
"description": "The path to the client key file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
}
},
"required": [
diff --git a/src/go/collectors/go.d.plugin/modules/cockroachdb/config_schema.json b/src/go/collectors/go.d.plugin/modules/cockroachdb/config_schema.json
index 1149c0f179..2b9b32bed7 100644
--- a/src/go/collectors/go.d.plugin/modules/cockroachdb/config_schema.json
+++ b/src/go/collectors/go.d.plugin/modules/cockroachdb/config_schema.json
@@ -75,17 +75,20 @@
"tls_ca": {
"title": "TLS CA",
"description": "The path to the CA certificate file for TLS verification.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_cert": {
"title": "TLS certificate",
"description": "The path to the client certificate file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_key": {
"title": "TLS key",
"description": "The path to the client key file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
}
},
"required": [
diff --git a/src/go/collectors/go.d.plugin/modules/consul/config_schema.json b/src/go/collectors/go.d.plugin/modules/consul/config_schema.json
index 709221522a..17de0d1cdb 100644
--- a/src/go/collectors/go.d.plugin/modules/consul/config_schema.json
+++ b/src/go/collectors/go.d.plugin/modules/consul/config_schema.json
@@ -81,17 +81,20 @@
"tls_ca": {
"title": "TLS CA",
"description": "The path to the CA certificate file for TLS verification.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_cert": {
"title": "TLS certificate",
"description": "The path to the client certificate file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_key": {
"title": "TLS key",
"description": "The path to the client key file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
}
},
"required": [
diff --git a/src/go/collectors/go.d.plugin/modules/coredns/config_schema.json b/src/go/collectors/go.d.plugin/modules/coredns/config_schema.json
index 9c0397e085..d62ef5d69b 100644
--- a/src/go/collectors/go.d.plugin/modules/coredns/config_schema.json
+++ b/src/go/collectors/go.d.plugin/modules/coredns/config_schema.json
@@ -30,6 +30,60 @@
"description": "If set, the client will not follow HTTP redirects automatically.",
"type": "boolean"
},
+ "per_server_stats": {
+ "title": "Server selector",
+ "description": "Configures collection of per-server statistics. If left empty, no stats will be collected. Matching is performed against the `server` label value.",
+ "type": "object",
+ "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).",
+ "type": "array",
+ "items": {
+ "title": "Server pattern",
+ "type": "string"
+ },
+ "uniqueItems": true
+ },
+ "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).",
+ "type": "array",
+ "items": {
+ "title": "Server pattern",
+ "type": "string"
+ },
+ "uniqueItems": true
+ }
+ }
+ },
+ "per_zone_stats": {
+ "title": "Zone selector",
+ "description": "Configures collection of per-zone statistics. If left empty, no stats will be collected. Matching is performed against the `zone` label value.",
+ "type": "object",
+ "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).",
+ "type": "array",
+ "items": {
+ "title": "Zone pattern",
+ "type": "string"
+ },
+ "uniqueItems": true
+ },
+ "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).",
+ "type": "array",
+ "items": {
+ "title": "Zone pattern",
+ "type": "string"
+ },
+ "uniqueItems": true
+ }
+ }
+ },
"username": {
"title": "Username",
"description": "The username for basic authentication.",
@@ -75,17 +129,20 @@
"tls_ca": {
"title": "TLS CA",
"description": "The path to the CA certificate file for TLS verification.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_cert": {
"title": "TLS certificate",
"description": "The path to the client certificate file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_key": {
"title": "TLS key",
"description": "The path to the client key file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
}
},
"required": [
@@ -93,6 +150,9 @@
]
},
"uiSchema": {
+ "uiOptions": {
+ "fullPage": true
+ },
"ui:flavour": "tabs",
"ui:options": {
"tabs": [
@@ -106,6 +166,13 @@
]
},
{
+ "title": "Server & Zone stats",
+ "fields": [
+ "per_server_stats",
+ "per_zone_stats"
+ ]
+ },
+ {
"title": "Auth",
"fields": [
"username",
@@ -137,12 +204,17 @@
}
]
},
- "uiOptions": {
- "fullPage": true
- },
"timeout": {
"ui:help": "Accepts decimals for precise control (e.g., type 1.5 for 1.5 seconds)."
},
+ "per_server_stats": {
+ "ui:help": "The logic for inclusion and exclusion is as follows: `(include1 OR include2) AND !(exclude1 OR exclude2)`.",
+ "ui:collapsible": true
+ },
+ "per_zone_stats": {
+ "ui:help": "The logic for inclusion and exclusion is as follows: `(include1 OR include2) AND !(exclude1 OR exclude2)`.",
+ "ui:collapsible": true
+ },
"password": {
"ui:widget": "password"
},
diff --git a/src/go/collectors/go.d.plugin/modules/couchbase/config_schema.json b/src/go/collectors/go.d.plugin/modules/couchbase/config_schema.json
index b1a2001191..15619244e2 100644
--- a/src/go/collectors/go.d.plugin/modules/couchbase/config_schema.json
+++ b/src/go/collectors/go.d.plugin/modules/couchbase/config_schema.json
@@ -75,17 +75,20 @@
"tls_ca": {
"title": "TLS CA",
"description": "The path to the CA certificate file for TLS verification.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_cert": {
"title": "TLS certificate",
"description": "The path to the client certificate file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_key": {
"title": "TLS key",
"description": "The path to the client key file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
}
},
"required": [
diff --git a/src/go/collectors/go.d.plugin/modules/couchdb/config_schema.json b/src/go/collectors/go.d.plugin/modules/couchdb/config_schema.json
index 8f40beee97..ff32ebe3b6 100644
--- a/src/go/collectors/go.d.plugin/modules/couchdb/config_schema.json
+++ b/src/go/collectors/go.d.plugin/modules/couchdb/config_schema.json
@@ -38,7 +38,7 @@
},
"databases": {
"title": "Databases",
- "description": "A space-separated list of database names for which database-specific statistics should be displayed.",
+ "description": "A space-separated list of database names for which you want to collect data. Leave blank to exclude database statistics.",
"type": "string"
},
"username": {
@@ -86,17 +86,20 @@
"tls_ca": {
"title": "TLS CA",
"description": "The path to the CA certificate file for TLS verification.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_cert": {
"title": "TLS certificate",
"description": "The path to the client certificate file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
},
"tls_key": {
"title": "TLS key",
"description": "The path to the client key file for TLS authentication.",
- "type": "string"
+ "type": "string",
+ "pattern": "^/"
}
},
"required": [
diff --git a/src/go/collectors/go.d.plugin/modules/dnsdist/config_schema.json b/src/go/collectors/go.d.plugin/modules/dnsdist/config_schema.json
index 6cbedd5489..745c49c864 100644
--- a/src/go/collectors/go.d.plugin/modules/dnsdist/config_schema.json
+++ b/src/go/collectors/go.d.plugin/modules/dnsdist/config_schema.json
@@ -75,17 +75,20 @@
"tls_ca": {
"title": "TLS CA",
"description": "The path to the CA certificate file for TL