diff --git a/docs/sources/flow/reference/components/discovery.kubernetes.md b/docs/sources/flow/reference/components/discovery.kubernetes.md index 73b2cd8c98f0..fddf023d365b 100644 --- a/docs/sources/flow/reference/components/discovery.kubernetes.md +++ b/docs/sources/flow/reference/components/discovery.kubernetes.md @@ -289,88 +289,23 @@ selectors][] to learn more about the possible filters that can be used. ### http_client_config block -The `http_client_config` block configures settings used to connect to the -Kubernetes API server. - -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`bearer_token` | `secret` | Bearer token to authenticate with. | | no -`bearer_token_file` | `string` | File containing a bearer token to authenticate with. | | no -`proxy_url` | `string` | HTTP proxy to proxy requests through. | | no -`follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no -`enable_http_2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no - -`bearer_token`, `bearer_token_file`, `basic_auth`, `authorization`, and -`oauth2` are mutually exclusive and only one can be provided inside of a -`http_client_config` block. - -The following sub-blocks are supported for `http_client_config`: - -Name | Description | Required ----- | ----------- | -------- -[`basic_auth`](#basic_auth-block) | Configure basic_auth for authenticating against Kubernetes. | no -[`authorization`](#authorization-block) | Configure generic authorization against Kubernetes. | no -[`oauth2`](#oauth2-block) | Configure OAuth2 for authenticating against Kubernetes. | no -[`tls_config`](#tls_config-block) | Configure TLS settings for connecting to Kubernetes. | no +{{< docs/shared lookup="flow/reference/components/http-client-config-block.md" source="agent" >}} ### basic_auth block -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`username` | `string` | Basic auth username. | | no -`password` | `secret` | Basic auth password. | | no -`password_file` | `string` | File containing the basic auth password. | | no - -`password` and `password_file` are mututally exclusive and only one can be -provided inside of a `basic_auth` block. +{{< docs/shared lookup="flow/reference/components/basic-auth-block.md" source="agent" >}} ### authorization block -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`type` | `string` | Authorization type, for example, "Bearer". | | no -`credential` | `secret` | Secret value. | | no -`credentials_file` | `string` | File containing the secret value. | | no - -`credential` and `credentials_file` are mututally exclusive and only one can be -provided inside of an `authorization` block. +{{< docs/shared lookup="flow/reference/components/authorization-block.md" source="agent" >}} ### oauth2 block -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`client_id` | `string` | OAuth2 client ID. | | no -`client_secret` | `secret` | OAuth2 client secret. | | no -`client_secret_file` | `string` | File containing the OAuth2 client secret. | | no -`scopes` | `list(string)` | List of scopes to authenticate with. | | no -`token_url` | `string` | URL to fetch the token from. | | no -`endpoint_params` | `map(string)` | Optional parameters to append to the token URL. | | no -`proxy_url` | `string` | Optional proxy URL for OAuth2 requests. | | no - -`client_secret` and `client_secret_file` are mututally exclusive and only one -can be provided inside of an `oauth2` block. - -The `oauth2` block may also contain its own separate `tls_config` sub-block. +{{< docs/shared lookup="flow/reference/components/oauth2-block.md" source="agent" >}} ### tls_config block -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`ca_file` | `string` | CA certificate to validate the server with. | | no -`cert_file` | `string` | Certificate file for client authentication. | | no -`key_file` | `string` | Key file for client authentication. | | no -`server_name` | `string` | ServerName extension to indicate the name of the server. | | no -`insecure_skip_verify` | `bool` | Disables validation of the server certificate. | | no -`min_version` | `string` | Minimum acceptable TLS version. | | no - -When `min_version` is not provided, the minumum acceptable TLS version is -inherited from Go's default minimum version, TLS 1.2. If `min_version` is -provided, it must be set to one of the following strings: - -* `"TLS10"` (TLS 1.0) -* `"TLS11"` (TLS 1.1) -* `"TLS12"` (TLS 1.2) -* `"TLS13"` (TLS 1.3) +{{< docs/shared lookup="flow/reference/components/tls-config-block.md" source="agent" >}} ## Exported fields diff --git a/docs/sources/flow/reference/components/discovery.relabel.md b/docs/sources/flow/reference/components/discovery.relabel.md index 71073f893f95..1e16a60bf4c9 100644 --- a/docs/sources/flow/reference/components/discovery.relabel.md +++ b/docs/sources/flow/reference/components/discovery.relabel.md @@ -66,36 +66,7 @@ rule | [rule][] | Relabeling rules to apply to targets. | no ### rule block -The `rule` block contains the definition of any relabeling rules that -can be applied to an input target. If more than one `rule` block is -defined within `discovery.relabel`, the transformations are applied -in top-down order. - -The following arguments can be used to configure a `rule` block. -All arguments are optional and any omitted fields take on their default -values. - -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`source_labels` | `list(string)` | The list of labels whose values should be selected. Their content is concatenated using the `separator` and matched against `regex`. | | no -`separator` | `string` | The separator used to concatenate the values present in `source_labels`. | `;` | no -`regex` | `string` | A valid RE2 expression with support for parenthesized capture groups. Used to match the extracted value from the combination of the `source_label` and `separator` fields or filter labels during the labelkeep/labeldrop/labelmap actions. | `(.*)` | no -`modulus` | `uint` | A positive integer used to calculate the modulus of the hashed source label values. | | no -`target_label` | `string` | Label to which the resulting value are written to. | | no -`replacement` | `string` | The value against which a regex replace is performed, if the regex matched the extracted value. Supports previously captured groups. | `$1` | no -`action` | `string` | The relabeling action to perform. | `replace` | no - -Here's a list of the available actions along with a brief description of their usage. - -* `replace` - This action matches `regex` to the concatenated labels. If there's a match, it replaces the content of the `target_label` using the contents of the `replacement` field. -* `keep` - This action only keeps the targets where `regex` matches the string extracted using the `source_labels` and `separator`. -* `drop` - This action drops the targets where `regex` matches the string extracted using the `source_labels` and `separator`. -* `hashmod` - This action hashes the concatenated labels, calculates its modulo `modulus` and writes the result to the `target_label`. -* `labelmap` - This action matches `regex` against all label names. Any labels that match are renamed according to the contents of the `replacement` field. -* `labeldrop` - This action matches `regex` against all label names. Any labels that match are removed from the target's label set. -* `labelkeep` - This action matches `regex` against all label names. Any labels that don't match are removed from the target's label set. - -Finally, note that the regex capture groups can be referred to using either the `$1` or `$${1}` notation. +{{< docs/shared lookup="flow/reference/components/rule-block.md" source="agent" >}} ## Exported fields diff --git a/docs/sources/flow/reference/components/otelcol.processor.batch.md b/docs/sources/flow/reference/components/otelcol.processor.batch.md index ae1ebd835739..2a83d333326c 100644 --- a/docs/sources/flow/reference/components/otelcol.processor.batch.md +++ b/docs/sources/flow/reference/components/otelcol.processor.batch.md @@ -72,7 +72,7 @@ output | [output][] | Configures where to send received telemetry data. | yes ### output block -{{< docs/shared lookup="flow/otelcol/output-block.md" source="agent" >}} +{{< docs/shared lookup="flow/reference/components/output-block.md" source="agent" >}} ## Exported fields diff --git a/docs/sources/flow/reference/components/otelcol.receiver.jaeger.md b/docs/sources/flow/reference/components/otelcol.receiver.jaeger.md index 75bcecc58b26..c26d8a8c1b3e 100644 --- a/docs/sources/flow/reference/components/otelcol.receiver.jaeger.md +++ b/docs/sources/flow/reference/components/otelcol.receiver.jaeger.md @@ -226,7 +226,7 @@ Name | Type | Description | Default | Required ### output block -{{< docs/shared lookup="flow/otelcol/output-block.md" source="agent" >}} +{{< docs/shared lookup="flow/reference/components/output-block.md" source="agent" >}} ## Exported fields diff --git a/docs/sources/flow/reference/components/otelcol.receiver.otlp.md b/docs/sources/flow/reference/components/otelcol.receiver.otlp.md index 431abcd6e0db..0a3ea3033578 100644 --- a/docs/sources/flow/reference/components/otelcol.receiver.otlp.md +++ b/docs/sources/flow/reference/components/otelcol.receiver.otlp.md @@ -172,7 +172,7 @@ If `allowed_headers` includes `"*"`, all headers will be permitted. ### output block -{{< docs/shared lookup="flow/otelcol/output-block.md" source="agent" >}} +{{< docs/shared lookup="flow/reference/components/output-block.md" source="agent" >}} ## Exported fields diff --git a/docs/sources/flow/reference/components/prometheus.relabel.md b/docs/sources/flow/reference/components/prometheus.relabel.md index 997afa1ba1cd..c1cca9fc4df6 100644 --- a/docs/sources/flow/reference/components/prometheus.relabel.md +++ b/docs/sources/flow/reference/components/prometheus.relabel.md @@ -63,36 +63,7 @@ rule | [rule][] | Relabeling rules to apply to received metrics. | no ### rule block -The `rule` block contains the definition of any relabeling -rules that can be applied to an input metric. If more than one -`rule` block is defined within `prometheus.relabel`, the -transformations are applied in top-down order. - -The following arguments can be used to configure a `rule`. -All arguments are optional. Omitted fields take their default values. - -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`source_labels` | `list(string)` | The list of labels whose values are to be selected. Their content is concatenated using the `separator` and matched against `regex`. | | no -`separator` | `string` | The separator used to concatenate the values present in `source_labels`. | ; | no -`regex` | `string` | A valid RE2 expression with support for parenthesized capture groups. Used to match the extracted value from the combination of the `source_label` and `separator` fields or filter labels during the `labelkeep/labeldrop/labelmap` actions. | `(.*)` | no -`modulus` | `uint` | A positive integer used to calculate the modulus of the hashed source label values. | | no -`target_label` | `string` | Label to which the resulting value will be written to. | | no -`replacement` | `string` | The value against which a regex replace is performed, if the regex matches the extracted value. Supports previously captured groups. | $1 | no -`action` | `string` | The relabeling action to perform. | replace | no - -Here's a list of the available actions, along with a brief description of their usage. - -* `replace` - Matches `regex` to the concatenated labels. If there's a match, it replaces the content of the `target_label` using the contents of the `replacement` field. -* `keep` - Keeps metrics where `regex` matches the string extracted using the `source_labels` and `separator`. -* `drop` - Drops metrics where `regex` matches the string extracted using the `source_labels` and `separator`. -* `hashmod` - Hashes the concatenated labels, calculates its modulo `modulus` and writes the result to the `target_label`. -* `labelmap` - Matches `regex` against all label names. Any labels that match are renamed according to the contents of the `replacement` field. -* `labeldrop` - Matches `regex` against all label names. Any labels that match are removed from the metric's label set. -* `labelkeep` - Matches `regex` against all label names. Any labels that don't match are removed from the metric's label set. - -Finally, note that the regex capture groups can be referred to using either the -`$1` or `$${1}` notation. +{{< docs/shared lookup="flow/reference/components/rule-block.md" source="agent" >}} ## Exported fields diff --git a/docs/sources/flow/reference/components/prometheus.remote_write.md b/docs/sources/flow/reference/components/prometheus.remote_write.md index a79e4e722228..2bdbae021e26 100644 --- a/docs/sources/flow/reference/components/prometheus.remote_write.md +++ b/docs/sources/flow/reference/components/prometheus.remote_write.md @@ -96,79 +96,23 @@ based on a hash of the endpoint settings. ### http_client_config block -The `http_client_config` block configures the HTTP client used to connect to an -endpoint. - -The following arguments are supported: - -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`bearer_token` | `secret` | Bearer token to authenticate with. | | no -`bearer_token_file` | `string` | File containing a bearer token to authenticate with. | | no -`proxy_url` | `string` | HTTP proxy to proxy requests through. | | no -`follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no -`enable_http_2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no - -`bearer_token`, `bearer_token_file`, `basic_auth`, `authorization`, and -`oauth2` are mutually exclusive and only one can be provided inside of a -`http_client_config` block. +{{< docs/shared lookup="flow/reference/components/http-client-config-block.md" source="agent" >}} ### basic_auth block -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`username` | `string` | Basic auth username. | | no -`password` | `secret` | Basic auth password. | | no -`password_file` | `string` | File containing the basic auth password. | | no - -`password` and `password_file` are mututally exclusive and only one can be -provided inside of a `basic_auth` block. +{{< docs/shared lookup="flow/reference/components/basic-auth-block.md" source="agent" >}} ### authorization block -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`type` | `string` | Authorization type, for example, "Bearer". | | no -`credential` | `secret` | Secret value. | | no -`credentials_file` | `string` | File containing the secret value. | | no - -`credential` and `credentials_file` are mututally exclusive and only one can be -provided inside of an `authorization` block. +{{< docs/shared lookup="flow/reference/components/authorization-block.md" source="agent" >}} ### oauth2 block -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`client_id` | `string` | OAuth2 client ID. | | no -`client_secret` | `secret` | OAuth2 client secret. | | no -`client_secret_file` | `string` | File containing the OAuth2 client secret. | | no -`scopes` | `list(string)` | List of scopes to authenticate with. | | no -`token_url` | `string` | URL to fetch the token from. | | no -`endpoint_params` | `map(string)` | Optional parameters to append to the token URL. | | no -`proxy_url` | `string` | Optional proxy URL for OAuth2 requests. | | no - -`client_secret` and `client_secret_file` are mututally exclusive and only one -can be provided inside of an `oauth2` block. +{{< docs/shared lookup="flow/reference/components/oauth2-block.md" source="agent" >}} ### tls_config block -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`ca_file` | `string` | CA certificate to validate the server with. | | no -`cert_file` | `string` | Certificate file for client authentication. | | no -`key_file` | `string` | Key file for client authentication. | | no -`server_name` | `string` | ServerName extension to indicate the name of the server. | | no -`insecure_skip_verify` | `bool` | Disables validation of the server certificate. | | no -`min_version` | `string` | Minimum acceptable TLS version. | | no - -When `min_version` is not provided, the minimum acceptable TLS version is -inherited from Go's default minimum version, TLS 1.2. If `min_version` is -provided, it must be set to one of the following strings: - -* `"TLS10"` (TLS 1.0) -* `"TLS11"` (TLS 1.1) -* `"TLS12"` (TLS 1.2) -* `"TLS13"` (TLS 1.3) +{{< docs/shared lookup="flow/reference/components/tls-config-block.md" source="agent" >}} ### queue_config block diff --git a/docs/sources/flow/reference/components/prometheus.scrape.md b/docs/sources/flow/reference/components/prometheus.scrape.md index 497507d6bf8b..80dc5d386208 100644 --- a/docs/sources/flow/reference/components/prometheus.scrape.md +++ b/docs/sources/flow/reference/components/prometheus.scrape.md @@ -83,79 +83,23 @@ an `http_client_config` block. ### http_client_config block -The `http_client_config` block configures the HTTP client used to connect to an -endpoint. - -The following arguments are supported: - -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`bearer_token` | `secret` | Bearer token to authenticate with. | | no -`bearer_token_file` | `string` | File containing a bearer token to authenticate with. | | no -`proxy_url` | `string` | HTTP proxy to proxy requests through. | | no -`follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no -`enable_http_2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no - -`bearer_token`, `bearer_token_file`, `basic_auth`, `authorization`, and -`oauth2` are mutually exclusive and only one can be provided inside of a -`http_client_config` block. +{{< docs/shared lookup="flow/reference/components/http-client-config-block.md" source="agent" >}} ### basic_auth block -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`username` | `string` | Basic auth username. | | no -`password` | `secret` | Basic auth password. | | no -`password_file` | `string` | File containing the basic auth password. | | no - -`password` and `password_file` are mututally exclusive and only one can be -provided inside of a `basic_auth` block. +{{< docs/shared lookup="flow/reference/components/basic-auth-block.md" source="agent" >}} ### authorization block -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`type` | `string` | Authorization type, for example, "Bearer". | | no -`credential` | `secret` | Secret value. | | no -`credentials_file` | `string` | File containing the secret value. | | no - -`credential` and `credentials_file` are mututally exclusive and only one can be -provided inside of an `authorization` block. +{{< docs/shared lookup="flow/reference/components/authorization-block.md" source="agent" >}} ### oauth2 block -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`client_id` | `string` | OAuth2 client ID. | | no -`client_secret` | `secret` | OAuth2 client secret. | | no -`client_secret_file` | `string` | File containing the OAuth2 client secret. | | no -`scopes` | `list(string)` | List of scopes to authenticate with. | | no -`token_url` | `string` | URL to fetch the token from. | | no -`endpoint_params` | `map(string)` | Optional parameters to append to the token URL. | | no -`proxy_url` | `string` | Optional proxy URL for OAuth2 requests. | | no - -`client_secret` and `client_secret_file` are mututally exclusive and only one -can be provided inside of an `oauth2` block. +{{< docs/shared lookup="flow/reference/components/oauth2-block.md" source="agent" >}} ### tls_config block -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`ca_file` | `string` | CA certificate to validate the server with. | | no -`cert_file` | `string` | Certificate file for client authentication. | | no -`key_file` | `string` | Key file for client authentication. | | no -`server_name` | `string` | ServerName extension to indicate the name of the server. | | no -`insecure_skip_verify` | `bool` | Disables validation of the server certificate. | | no -`min_version` | `string` | Minimum acceptable TLS version. | | no - -When `min_version` is not provided, the minimum acceptable TLS version is -inherited from Go's default minimum version, TLS 1.2. If `min_version` is -provided, it must be set to one of the following strings: - -* `"TLS10"` (TLS 1.0) -* `"TLS11"` (TLS 1.1) -* `"TLS12"` (TLS 1.2) -* `"TLS13"` (TLS 1.3) +{{< docs/shared lookup="flow/reference/components/tls-config-block.md" source="agent" >}} ## Exported fields diff --git a/docs/sources/shared/flow/reference/components/authorization-block.md b/docs/sources/shared/flow/reference/components/authorization-block.md new file mode 100644 index 000000000000..8b71a3b5b74c --- /dev/null +++ b/docs/sources/shared/flow/reference/components/authorization-block.md @@ -0,0 +1,14 @@ +--- +aliases: +- /docs/agent/shared/flow/reference/components/authorization-block/ +headless: true +--- + +Name | Type | Description | Default | Required +---- | ---- | ----------- | ------- | -------- +`type` | `string` | Authorization type, for example, "Bearer". | | no +`credential` | `secret` | Secret value. | | no +`credentials_file` | `string` | File containing the secret value. | | no + +`credential` and `credentials_file` are mututally exclusive and only one can be +provided inside of an `authorization` block. diff --git a/docs/sources/shared/flow/reference/components/basic-auth-block.md b/docs/sources/shared/flow/reference/components/basic-auth-block.md new file mode 100644 index 000000000000..c6e21df798c6 --- /dev/null +++ b/docs/sources/shared/flow/reference/components/basic-auth-block.md @@ -0,0 +1,14 @@ +--- +aliases: +- /docs/agent/shared/flow/reference/components/basic-auth-block/ +headless: true +--- + +Name | Type | Description | Default | Required +---- | ---- | ----------- | ------- | -------- +`username` | `string` | Basic auth username. | | no +`password` | `secret` | Basic auth password. | | no +`password_file` | `string` | File containing the basic auth password. | | no + +`password` and `password_file` are mututally exclusive and only one can be +provided inside of a `basic_auth` block. diff --git a/docs/sources/shared/flow/reference/components/http-client-config-block.md b/docs/sources/shared/flow/reference/components/http-client-config-block.md new file mode 100644 index 000000000000..17ef597e0c74 --- /dev/null +++ b/docs/sources/shared/flow/reference/components/http-client-config-block.md @@ -0,0 +1,29 @@ +--- +aliases: +- /docs/agent/shared/flow/reference/components/http-client-config-block/ +headless: true +--- + +The `http_client_config` block configures settings used to connect to the +Kubernetes API server. + +Name | Type | Description | Default | Required +---- | ---- | ----------- | ------- | -------- +`bearer_token` | `secret` | Bearer token to authenticate with. | | no +`bearer_token_file` | `string` | File containing a bearer token to authenticate with. | | no +`proxy_url` | `string` | HTTP proxy to proxy requests through. | | no +`follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no +`enable_http_2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no + +`bearer_token`, `bearer_token_file`, `basic_auth`, `authorization`, and +`oauth2` are mutually exclusive and only one can be provided inside of a +`http_client_config` block. + +The following sub-blocks are supported for `http_client_config`: + +Name | Description | Required +---- | ----------- | -------- +[`basic_auth`](#basic_auth-block) | Configure basic_auth for authenticating against Kubernetes. | no +[`authorization`](#authorization-block) | Configure generic authorization against Kubernetes. | no +[`oauth2`](#oauth2-block) | Configure OAuth2 for authenticating against Kubernetes. | no +[`tls_config`](#tls_config-block) | Configure TLS settings for connecting to Kubernetes. | no diff --git a/docs/sources/shared/flow/reference/components/oauth2-block.md b/docs/sources/shared/flow/reference/components/oauth2-block.md new file mode 100644 index 000000000000..3804b77c3d59 --- /dev/null +++ b/docs/sources/shared/flow/reference/components/oauth2-block.md @@ -0,0 +1,20 @@ +--- +aliases: +- /docs/agent/shared/flow/reference/components/oauth2-block/ +headless: true +--- + +Name | Type | Description | Default | Required +---- | ---- | ----------- | ------- | -------- +`client_id` | `string` | OAuth2 client ID. | | no +`client_secret` | `secret` | OAuth2 client secret. | | no +`client_secret_file` | `string` | File containing the OAuth2 client secret. | | no +`scopes` | `list(string)` | List of scopes to authenticate with. | | no +`token_url` | `string` | URL to fetch the token from. | | no +`endpoint_params` | `map(string)` | Optional parameters to append to the token URL. | | no +`proxy_url` | `string` | Optional proxy URL for OAuth2 requests. | | no + +`client_secret` and `client_secret_file` are mututally exclusive and only one +can be provided inside of an `oauth2` block. + +The `oauth2` block may also contain its own separate `tls_config` sub-block. \ No newline at end of file diff --git a/docs/sources/shared/flow/otelcol/output-block.md b/docs/sources/shared/flow/reference/components/output-block.md similarity index 100% rename from docs/sources/shared/flow/otelcol/output-block.md rename to docs/sources/shared/flow/reference/components/output-block.md diff --git a/docs/sources/shared/flow/reference/components/rule-block.md b/docs/sources/shared/flow/reference/components/rule-block.md new file mode 100644 index 000000000000..547256083df9 --- /dev/null +++ b/docs/sources/shared/flow/reference/components/rule-block.md @@ -0,0 +1,36 @@ +--- +aliases: +- /docs/agent/shared/flow/reference/components/rule-block/ +headless: true +--- + +The `rule` block contains the definition of any relabeling +rules that can be applied to an input metric. If more than one +`rule` block is defined within `prometheus.relabel`, the +transformations are applied in top-down order. + +The following arguments can be used to configure a `rule`. +All arguments are optional. Omitted fields take their default values. + +Name | Type | Description | Default | Required +---- | ---- | ----------- | ------- | -------- +`source_labels` | `list(string)` | The list of labels whose values are to be selected. Their content is concatenated using the `separator` and matched against `regex`. | | no +`separator` | `string` | The separator used to concatenate the values present in `source_labels`. | ; | no +`regex` | `string` | A valid RE2 expression with support for parenthesized capture groups. Used to match the extracted value from the combination of the `source_label` and `separator` fields or filter labels during the `labelkeep/labeldrop/labelmap` actions. | `(.*)` | no +`modulus` | `uint` | A positive integer used to calculate the modulus of the hashed source label values. | | no +`target_label` | `string` | Label to which the resulting value will be written to. | | no +`replacement` | `string` | The value against which a regex replace is performed, if the regex matches the extracted value. Supports previously captured groups. | $1 | no +`action` | `string` | The relabeling action to perform. | replace | no + +Here's a list of the available actions, along with a brief description of their usage. + +* `replace` - Matches `regex` to the concatenated labels. If there's a match, it replaces the content of the `target_label` using the contents of the `replacement` field. +* `keep` - Keeps metrics where `regex` matches the string extracted using the `source_labels` and `separator`. +* `drop` - Drops metrics where `regex` matches the string extracted using the `source_labels` and `separator`. +* `hashmod` - Hashes the concatenated labels, calculates its modulo `modulus` and writes the result to the `target_label`. +* `labelmap` - Matches `regex` against all label names. Any labels that match are renamed according to the contents of the `replacement` field. +* `labeldrop` - Matches `regex` against all label names. Any labels that match are removed from the metric's label set. +* `labelkeep` - Matches `regex` against all label names. Any labels that don't match are removed from the metric's label set. + +Finally, note that the regex capture groups can be referred to using either the +`$1` or `$${1}` notation. diff --git a/docs/sources/shared/flow/reference/components/tls-config-block.md b/docs/sources/shared/flow/reference/components/tls-config-block.md new file mode 100644 index 000000000000..25ac52675ba9 --- /dev/null +++ b/docs/sources/shared/flow/reference/components/tls-config-block.md @@ -0,0 +1,23 @@ +--- +aliases: +- /docs/agent/shared/flow/reference/components/tls-config-block/ +headless: true +--- + +Name | Type | Description | Default | Required +---- | ---- | ----------- | ------- | -------- +`ca_file` | `string` | CA certificate to validate the server with. | | no +`cert_file` | `string` | Certificate file for client authentication. | | no +`key_file` | `string` | Key file for client authentication. | | no +`server_name` | `string` | ServerName extension to indicate the name of the server. | | no +`insecure_skip_verify` | `bool` | Disables validation of the server certificate. | | no +`min_version` | `string` | Minimum acceptable TLS version. | | no + +When `min_version` is not provided, the minimum acceptable TLS version is +inherited from Go's default minimum version, TLS 1.2. If `min_version` is +provided, it must be set to one of the following strings: + +* `"TLS10"` (TLS 1.0) +* `"TLS11"` (TLS 1.1) +* `"TLS12"` (TLS 1.2) +* `"TLS13"` (TLS 1.3)