diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2024-03-14 20:22:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-14 20:22:42 +0200 |
commit | c56a123576b790528a9e4a030f1c0679b11c6665 (patch) | |
tree | 7127392ec7b4ebc1f80c8f594bcd9e4a4ff18088 /src/go | |
parent | 410884d7360b3b58a6fdd541b458fd08d444d3b9 (diff) |
go.d.plugin: jsonschema allow array/object to be null (#17166)
Diffstat (limited to 'src/go')
55 files changed, 468 insertions, 117 deletions
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 c2563f3743..1a1a155963 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 @@ -96,7 +96,10 @@ "headers": { "title": "Headers", "description": "Additional HTTP headers to include in the request.", - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" } 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 a5abd48729..981fa20877 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 @@ -62,7 +62,10 @@ "headers": { "title": "Headers", "description": "Additional HTTP headers to include in the request.", - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" } 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 ca1ae71d9b..2a9d5ddd1c 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 @@ -62,7 +62,10 @@ "headers": { "title": "Headers", "description": "Additional HTTP headers to include in the request.", - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" } 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 a32504ceb5..b64e3b5361 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 @@ -62,7 +62,10 @@ "headers": { "title": "Headers", "description": "Additional HTTP headers to include in the request.", - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" } 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 263e5d717d..2094e6f3f6 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 @@ -62,7 +62,10 @@ "headers": { "title": "Headers", "description": "Additional HTTP headers to include in the request.", - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" } 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 5fc9dcad89..8c4d39d94f 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 @@ -68,7 +68,10 @@ "headers": { "title": "Headers", "description": "Additional HTTP headers to include in the request.", - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" } 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 3edeaf79f3..bfb9616541 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 @@ -33,12 +33,18 @@ "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", + "type": [ + "object", + "null" + ], "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", + "type": [ + "array", + "null" + ], "items": { "title": "Server pattern", "type": "string" @@ -48,7 +54,10 @@ "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", + "type": [ + "array", + "null" + ], "items": { "title": "Server pattern", "type": "string" @@ -60,12 +69,18 @@ "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", + "type": [ + "object", + "null" + ], "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", + "type": [ + "array", + "null" + ], "items": { "title": "Zone pattern", "type": "string" @@ -75,7 +90,10 @@ "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", + "type": [ + "array", + "null" + ], "items": { "title": "Zone pattern", "type": "string" @@ -116,7 +134,10 @@ "headers": { "title": "Headers", "description": "Additional HTTP headers to include in the request.", - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" } 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 bba52b5fa4..36fe08f061 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 @@ -62,7 +62,10 @@ "headers": { "title": "Headers", "description": "Additional HTTP headers to include in the request.", - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" } 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 d015d29181..f7cd73d2ee 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 @@ -73,7 +73,10 @@ "headers": { "title": "Headers", "description": "Additional HTTP headers to include in the request.", - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" } 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 9361967f60..74e3d959ee 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 @@ -62,7 +62,10 @@ "headers": { "title": "Headers", "description": "Additional HTTP headers to include in the request.", - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" } diff --git a/src/go/collectors/go.d.plugin/modules/dnsquery/config_schema.json b/src/go/collectors/go.d.plugin/modules/dnsquery/config_schema.json index 3725461bd9..8ad870a227 100644 --- a/src/go/collectors/go.d.plugin/modules/dnsquery/config_schema.json +++ b/src/go/collectors/go.d.plugin/modules/dnsquery/config_schema.json @@ -37,7 +37,10 @@ "record_types": { "title": "Record types", "description": "Types of DNS records to query for each server.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "type": "string", "enum": [ @@ -63,7 +66,10 @@ "servers": { "title": "Servers", "description": "List of DNS servers to query.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "title": "DNS server", "description": "IP address or hostname of the DNS server.", @@ -78,7 +84,10 @@ "domains": { "title": "Domains", "description": "List of domains or subdomains to query. A random domain will be selected from this list at each iteration.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "title": "Domain", "type": "string" diff --git a/src/go/collectors/go.d.plugin/modules/docker_engine/config_schema.json b/src/go/collectors/go.d.plugin/modules/docker_engine/config_schema.json index 3c43587813..2beb8e6449 100644 --- a/src/go/collectors/go.d.plugin/modules/docker_engine/config_schema.json +++ b/src/go/collectors/go.d.plugin/modules/docker_engine/config_schema.json @@ -62,7 +62,10 @@ "headers": { "title": "Headers", "description": "Additional HTTP headers to include in the request.", - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" } diff --git a/src/go/collectors/go.d.plugin/modules/dockerhub/config_schema.json b/src/go/collectors/go.d.plugin/modules/dockerhub/config_schema.json index 9e52821e51..c791274f8d 100644 --- a/src/go/collectors/go.d.plugin/modules/dockerhub/config_schema.json +++ b/src/go/collectors/go.d.plugin/modules/dockerhub/config_schema.json @@ -28,7 +28,10 @@ "repositories": { "title": "Repositories", "description": "List of repositories to monitor.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "title": "Name", "description": "The name of the repository.", @@ -74,7 +77,10 @@ "headers": { "title": "Headers", "description": "Additional HTTP headers to include in the request.", - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" } diff --git a/src/go/collectors/go.d.plugin/modules/elasticsearch/config_schema.json b/src/go/collectors/go.d.plugin/modules/elasticsearch/config_schema.json index fbc9369cea..2930351054 100644 --- a/src/go/collectors/go.d.plugin/modules/elasticsearch/config_schema.json +++ b/src/go/collectors/go.d.plugin/modules/elasticsearch/config_schema.json @@ -92,7 +92,10 @@ "headers": { "title": "Headers", "description": "Additional HTTP headers to include in the request.", - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" } diff --git a/src/go/collectors/go.d.plugin/modules/envoy/config_schema.json b/src/go/collectors/go.d.plugin/modules/envoy/config_schema.json index 1ba2c83ade..1fa73f6680 100644 --- a/src/go/collectors/go.d.plugin/modules/envoy/config_schema.json +++ b/src/go/collectors/go.d.plugin/modules/envoy/config_schema.json @@ -62,7 +62,10 @@ "headers": { "title": "Headers", "description": "Additional HTTP headers to include in the request.", - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" } diff --git a/src/go/collectors/go.d.plugin/modules/example/config_schema.json b/src/go/collectors/go.d.plugin/modules/example/config_schema.json index e22617038a..2f878d4ce7 100644 --- a/src/go/collectors/go.d.plugin/modules/example/config_schema.json +++ b/src/go/collectors/go.d.plugin/modules/example/config_schema.json @@ -13,7 +13,10 @@ }, "charts": { "title": "Charts configuration", - "type": "object", + "type": [ + "object", + "null" + ], "properties": { "type": { "title": "Chart type", @@ -65,7 +68,10 @@ }, "hidden_charts": { "title": "Hidden charts configuration", - "type": "object", + "type": [ + "object", + "null" + ], "properties": { "type": { "title": "Chart type", diff --git a/src/go/collectors/go.d.plugin/modules/filecheck/config_schema.json b/src/go/collectors/go.d.plugin/modules/filecheck/config_schema.json index 8a9a6f2086..bb9e4f4a9a 100644 --- a/src/go/collectors/go.d.plugin/modules/filecheck/config_schema.json +++ b/src/go/collectors/go.d.plugin/modules/filecheck/config_schema.json @@ -14,12 +14,18 @@ "files": { "title": "File selector", "description": "Configuration for monitoring specific files. If left empy, no files will be monitored.", - "type": "object", + "type": [ + "object", + "null" + ], "properties": { "include": { "title": "Include", "description": "Include files that match any of the specified include [patterns](https://golang.org/pkg/path/filepath/#Match).", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "title": "Filepath", "type": "string", @@ -30,7 +36,10 @@ "exclude": { "title": "Exclude", "description": "Exclude files that match any of the specified exclude [patterns](https://golang.org/pkg/path/filepath/#Match).", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "title": "Filepath", "type": "string", @@ -52,12 +61,18 @@ "dirs": { "title": "Directory selector", "description": "Configuration for monitoring specific directories. If left empy, no directories will be monitored.", - "type": "object", + "type": [ + "object", + "null" + ], "properties": { "include": { "title": "Include", "description": "Include directories that match any of the specified include [patterns](https://golang.org/pkg/path/filepath/#Match).", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "title": "Directory", "type": "string", |