summaryrefslogtreecommitdiffstats
path: root/src/go/collectors/go.d.plugin/modules/prometheus/config_schema.json
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/go/collectors/go.d.plugin/modules/prometheus/config_schema.json291
1 files changed, 291 insertions, 0 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/prometheus/config_schema.json b/src/go/collectors/go.d.plugin/modules/prometheus/config_schema.json
new file mode 100644
index 000000000..9f9cac307
--- /dev/null
+++ b/src/go/collectors/go.d.plugin/modules/prometheus/config_schema.json
@@ -0,0 +1,291 @@
+{
+ "jsonSchema": {
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "Prometheus collector configuration.",
+ "type": "object",
+ "properties": {
+ "update_every": {
+ "title": "Update every",
+ "description": "Data collection interval, measured in seconds.",
+ "type": "integer",
+ "minimum": 1,
+ "default": 10
+ },
+ "url": {
+ "title": "URL",
+ "description": "The URL of the Prometheus metrics endpoint.",
+ "type": "string",
+ "format": "uri"
+ },
+ "timeout": {
+ "title": "Timeout",
+ "description": "The timeout in seconds for the HTTP request.",
+ "type": "number",
+ "minimum": 0.5,
+ "default": 10
+ },
+ "not_follow_redirects": {
+ "title": "Not follow redirects",
+ "description": "If set, the client will not follow HTTP redirects automatically.",
+ "type": "boolean"
+ },
+ "expected_prefix": {
+ "title": "Expected prefix",
+ "description": "If an endpoint does not return at least one metric with the specified prefix, the data is not processed.",
+ "type": "string"
+ },
+ "app": {
+ "title": "Application",
+ "description": "If set, this value will be used in the chart context as 'prometheus.{app}.{metric_name}'.",
+ "type": "string"
+ },
+ "selector": {
+ "title": "Selectors",
+ "description": "Configuration for selecting and filtering a set of time series using Prometheus selectors. If left empty, no filtering is applied.",
+ "type": [
+ "object",
+ "null"
+ ],
+ "properties": {
+ "allow": {
+ "title": "Allow",
+ "description": "Allow time series that match any of the specified [selectors](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/prometheus/selector#readme).",
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "title": "Selector",
+ "type": "string"
+ },
+ "uniqueItems": true
+ },
+ "deny": {
+ "title": "Deny",
+ "description": "Deny time series that match any of the specified [selectors](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/prometheus/selector#readme).",
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "title": "Selector",
+ "type": "string"
+ },
+ "uniqueItems": true
+ }
+ }
+ },
+ "max_time_series": {
+ "title": "Time series limit",
+ "description": "If an endpoint returns more time series than this limit, the data is not processed. Set to 0 for no limit.",
+ "type": "integer",
+ "minimum": 0,
+ "default": 2000
+ },
+ "max_time_series_per_metric": {
+ "title": "Time series per metric limit",
+ "description": "Metrics with more time series than this limit are skipped. Set to 0 for no limit.",
+ "type": "integer",
+ "minimum": 0,
+ "default": 200
+ },
+ "fallback_type": {
+ "title": "Untyped metrics fallback",
+ "description": "Process Untyped metrics as Counter or Gauge instead of ignoring them.",
+ "type": [
+ "object",
+ "null"
+ ],
+ "properties": {
+ "gauge": {
+ "title": "As Gauge",
+ "description": "Untyped metrics matching any [pattern](https://golang.org/pkg/path/filepath/#Match) will be processed as Gauge.",
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "title": "Pattern",
+ "type": "string"
+ },
+ "uniqueItems": true
+ },
+ "Counter": {
+ "title": "As Counter",
+ "description": "Untyped metrics matching any [pattern](https://golang.org/pkg/path/filepath/#Match) will be processed as Counter.",
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "title": "Pattern",
+ "type": "string"
+ },
+ "uniqueItems": true
+ }
+ }
+ },
+ "username": {
+ "title": "Username",
+ "description": "The username for basic authentication.",
+ "type": "string",
+ "sensitive": true
+ },
+ "password": {
+ "title": "Password",
+ "description": "The password for basic authentication.",
+ "type": "string",
+ "sensitive": true
+ },
+ "bearer_token_file": {
+ "title": "Bearer token file",
+ "description": "The path to the file with Bearer token.",
+ "type": "string"
+ },
+ "proxy_url": {
+ "title": "Proxy URL",
+ "description": "The URL of the proxy server.",
+ "type": "string"
+ },
+ "proxy_username": {
+ "title": "Proxy username",
+ "description": "The username for proxy authentication.",
+ "type": "string",
+ "sensitive": true
+ },
+ "proxy_password": {
+ "title": "Proxy password",
+ "description": "The password for proxy authentication.",
+ "type": "string",
+ "sensitive": true
+ },
+ "headers": {
+ "title": "Headers",
+ "description": "Additional HTTP headers to include in the request.",
+ "type": [
+ "object",
+ "null"
+ ],
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "tls_skip_verify": {
+ "title": "Skip TLS verification",
+ "description": "If set, TLS certificate verification will be skipped.",
+ "type": "boolean"
+ },
+ "tls_ca": {
+ "title": "TLS CA",
+ "description": "The path to the CA certificate file for TLS verification.",
+ "type": "string",
+ "pattern": "^$|^/"
+ },
+ "tls_cert": {
+ "title": "TLS certificate",
+ "description": "The path to the client certificate file for TLS authentication.",
+ "type": "string",
+ "pattern": "^$|^/"
+ },
+ "tls_key": {
+ "title": "TLS key",
+ "description": "The path to the client key file for TLS authentication.",
+ "type": "string",
+ "pattern": "^$|^/"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "additionalProperties": false,
+ "patternProperties": {
+ "^name$": {}
+ }
+ },
+ "uiSchema": {
+ "uiOptions": {
+ "fullPage": true
+ },
+ "ui:flavour": "tabs",
+ "ui:options": {
+ "tabs": [
+ {
+ "title": "Base",
+ "fields": [
+ "update_every",
+ "url",
+ "timeout",
+ "not_follow_redirects",
+ "expected_prefix",
+ "app"
+ ]
+ },
+ {
+ "title": "Selectors",
+ "fields": [
+ "selector"
+ ]
+ },
+ {
+ "title": "Limits",
+ "fields": [
+ "max_time_series",
+ "max_time_series_per_metric"
+ ]
+ },
+ {
+ "title": "Untyped fallback",
+ "fields": [
+ "fallback_type"
+ ]
+ },
+ {
+ "title": "Auth",
+ "fields": [
+ "username",
+ "password",
+ "bearer_token_file"
+ ]
+ },
+ {
+ "title": "TLS",
+ "fields": [
+ "tls_skip_verify",
+ "tls_ca",
+ "tls_cert",
+ "tls_key"
+ ]
+ },
+ {
+ "title": "Proxy",
+ "fields": [
+ "proxy_url",
+ "proxy_username",
+ "proxy_password"
+ ]
+ },
+ {
+ "title": "Headers",
+ "fields": [
+ "headers"
+ ]
+ }
+ ]
+ },
+ "url": {
+ "ui:placeholder": "http://203.0.113.0"
+ },
+ "timeout": {
+ "ui:help": "Accepts decimals for precise control (e.g., type 1.5 for 1.5 seconds)."
+ },
+ "selector": {
+ "ui:help": "The logic is as follows: `(allow1 OR allow2) AND !(deny1 OR deny2)`."
+ },
+ "password": {
+ "ui:widget": "password"
+ },
+ "proxy_password": {
+ "ui:widget": "password"
+ }
+ }
+}