From 6e4b22ae2b4e47c935c707a0ae2667c6569f39a9 Mon Sep 17 00:00:00 2001 From: Clayton Cornell Date: Fri, 17 Nov 2023 15:48:42 -0800 Subject: [PATCH] More updates to style and block sorting --- .../reference/components/discovery.azure.md | 14 +-- .../reference/components/discovery.consul.md | 32 +++--- .../components/discovery.consulagent.md | 32 +++--- .../components/discovery.digitalocean.md | 6 +- .../reference/components/discovery.dns.md | 6 +- .../reference/components/discovery.docker.md | 12 +-- .../components/discovery.dockerswarm.md | 97 +++++++++---------- .../reference/components/discovery.ec2.md | 64 ++++++------ .../reference/components/discovery.eureka.md | 79 ++++++++------- .../reference/components/discovery.file.md | 45 ++++----- .../reference/components/discovery.gce.md | 55 +++++------ .../reference/components/discovery.hetzner.md | 64 ++++++------ 12 files changed, 247 insertions(+), 259 deletions(-) diff --git a/docs/sources/flow/reference/components/discovery.azure.md b/docs/sources/flow/reference/components/discovery.azure.md index 85ae5d9f5ab8..d8bd1f2b8034 100644 --- a/docs/sources/flow/reference/components/discovery.azure.md +++ b/docs/sources/flow/reference/components/discovery.azure.md @@ -141,10 +141,10 @@ prometheus.remote_write "demo" { } ``` Replace the following: - - ``: Your Azure subscription ID. - - ``: Your Azure client ID. - - ``: Your Azure client secret. - - ``: Your Azure tenant ID. - - ``: The URL of the Prometheus remote_write-compatible server to send metrics to. - - ``: The username to use for authentication to the remote_write API. - - ``: The password to use for authentication to the remote_write API. + - _``_: Your Azure subscription ID. + - _``_: Your Azure client ID. + - _``_: Your Azure client secret. + - _``_: Your Azure tenant ID. + - _``_: The URL of the Prometheus remote_write-compatible server to send metrics to. + - _``_: The username to use for authentication to the remote_write API. + - _``_: The password to use for authentication to the remote_write API. diff --git a/docs/sources/flow/reference/components/discovery.consul.md b/docs/sources/flow/reference/components/discovery.consul.md index 28dbfccbf5b0..772c5e03ceff 100644 --- a/docs/sources/flow/reference/components/discovery.consul.md +++ b/docs/sources/flow/reference/components/discovery.consul.md @@ -104,19 +104,19 @@ Name | Type | Description Each target includes the following labels: -* `__meta_consul_address`: the address of the target. -* `__meta_consul_dc`: the datacenter name for the target. -* `__meta_consul_health`: the health status of the service. -* `__meta_consul_metadata_`: each node metadata key value of the target. -* `__meta_consul_node`: the node name defined for the target. -* `__meta_consul_partition`: the admin partition name where the service is registered. -* `__meta_consul_service_address`: the service address of the target. -* `__meta_consul_service_id`: the service ID of the target. -* `__meta_consul_service_metadata_`: each service metadata key value of the target. -* `__meta_consul_service_port`: the service port of the target. -* `__meta_consul_service`: the name of the service the target belongs to. -* `__meta_consul_tagged_address_`: each node tagged address key value of the target. -* `__meta_consul_tags`: the list of tags of the target joined by the tag separator. +* `__meta_consul_address`: The address of the target. +* `__meta_consul_dc`: The datacenter name for the target. +* `__meta_consul_health`: The health status of the service. +* `__meta_consul_metadata_`: Each node metadata key value of the target. +* `__meta_consul_node`: The node name defined for the target. +* `__meta_consul_partition`: The admin partition name where the service is registered. +* `__meta_consul_service_address`: The service address of the target. +* `__meta_consul_service_id`: The service ID of the target. +* `__meta_consul_service_metadata_`: Each service metadata key value of the target. +* `__meta_consul_service_port`: The service port of the target. +* `__meta_consul_service`: The name of the service the target belongs to. +* `__meta_consul_tagged_address_`: Each node tagged address key value of the target. +* `__meta_consul_tags`: The list of tags of the target joined by the tag separator. ## Component health @@ -160,6 +160,6 @@ prometheus.remote_write "demo" { } ``` Replace the following: - - ``: The URL of the Prometheus remote_write-compatible server to send metrics to. - - ``: The username to use for authentication to the remote_write API. - - ``: The password to use for authentication to the remote_write API. + - _``_: The URL of the Prometheus remote_write-compatible server to send metrics to. + - _``_: The username to use for authentication to the remote_write API. + - _``_: The password to use for authentication to the remote_write API. diff --git a/docs/sources/flow/reference/components/discovery.consulagent.md b/docs/sources/flow/reference/components/discovery.consulagent.md index 67859e575dca..ebac7f17c3e4 100644 --- a/docs/sources/flow/reference/components/discovery.consulagent.md +++ b/docs/sources/flow/reference/components/discovery.consulagent.md @@ -64,18 +64,18 @@ The following fields are exported and can be referenced by other components: Each target includes the following labels: -- `__meta_consulagent_address`: the address of the target. -- `__meta_consulagent_dc`: the datacenter name for the target. -- `__meta_consulagent_health`: the health status of the service. -- `__meta_consulagent_metadata_`: each node metadata key value of the target. -- `__meta_consulagent_node`: the node name defined for the target. -- `__meta_consulagent_service_address`: the service address of the target. -- `__meta_consulagent_service_id`: the service ID of the target. -- `__meta_consulagent_service_metadata_`: each service metadata key value of the target. -- `__meta_consulagent_service_port`: the service port of the target. -- `__meta_consulagent_service`: the name of the service the target belongs to. -- `__meta_consulagent_tagged_address_`: each node tagged address key value of the target. -- `__meta_consulagent_tags`: the list of tags of the target joined by the tag separator. +- `__meta_consulagent_address`: The address of the target. +- `__meta_consulagent_dc`: The datacenter name for the target. +- `__meta_consulagent_health`: The health status of the service. +- `__meta_consulagent_metadata_`: Each node metadata key value of the target. +- `__meta_consulagent_node`: The node name defined for the target. +- `__meta_consulagent_service_address`: The service address of the target. +- `__meta_consulagent_service_id`: The service ID of the target. +- `__meta_consulagent_service_metadata_`: Each service metadata key value of the target. +- `__meta_consulagent_service_port`: The service port of the target. +- `__meta_consulagent_service`: The name of the service the target belongs to. +- `__meta_consulagent_tagged_address_`: Each node tagged address key value of the target. +- `__meta_consulagent_tags`: The list of tags of the target joined by the tag separator. ## Component health @@ -84,7 +84,7 @@ In those cases, exported fields retain their last healthy values. ## Debug information -`discovery.consulagent` doen't expose any component-specific debug information. +`discovery.consulagent` doesn't expose any component-specific debug information. ## Debug metrics @@ -124,6 +124,6 @@ prometheus.remote_write "demo" { Replace the following: -- ``: The URL of the Prometheus remote_write-compatible server to send metrics to. -- ``: The username to use for authentication to the remote_write API. -- ``: The password to use for authentication to the remote_write API. +- _``_: The URL of the Prometheus remote_write-compatible server to send metrics to. +- _``_: The username to use for authentication to the remote_write API. +- _``_: The password to use for authentication to the remote_write API. diff --git a/docs/sources/flow/reference/components/discovery.digitalocean.md b/docs/sources/flow/reference/components/discovery.digitalocean.md index 88ab1127e4c2..833bceb09afe 100644 --- a/docs/sources/flow/reference/components/discovery.digitalocean.md +++ b/docs/sources/flow/reference/components/discovery.digitalocean.md @@ -116,6 +116,6 @@ prometheus.remote_write "demo" { } ``` Replace the following: - - ``: The URL of the Prometheus remote_write-compatible server to send metrics to. - - ``: The username to use for authentication to the remote_write API. - - ``: The password to use for authentication to the remote_write API. + - _``_: The URL of the Prometheus remote_write-compatible server to send metrics to. + - _``_: The username to use for authentication to the remote_write API. + - _``_: The password to use for authentication to the remote_write API. diff --git a/docs/sources/flow/reference/components/discovery.dns.md b/docs/sources/flow/reference/components/discovery.dns.md index 975b9d2f49d1..d7a57bfeb2cd 100644 --- a/docs/sources/flow/reference/components/discovery.dns.md +++ b/docs/sources/flow/reference/components/discovery.dns.md @@ -90,6 +90,6 @@ prometheus.remote_write "demo" { } ``` Replace the following: - - ``: The URL of the Prometheus remote_write-compatible server to send metrics to. - - ``: The username to use for authentication to the remote_write API. - - ``: The password to use for authentication to the remote_write API. + - _``_: The URL of the Prometheus remote_write-compatible server to send metrics to. + - _``_: The username to use for authentication to the remote_write API. + - _``_: The password to use for authentication to the remote_write API. diff --git a/docs/sources/flow/reference/components/discovery.docker.md b/docs/sources/flow/reference/components/discovery.docker.md index 6adb01251a1d..19218c07edc3 100644 --- a/docs/sources/flow/reference/components/discovery.docker.md +++ b/docs/sources/flow/reference/components/discovery.docker.md @@ -168,9 +168,9 @@ prometheus.remote_write "demo" { } ``` Replace the following: - - ``: The URL of the Prometheus remote_write-compatible server to send metrics to. - - ``: The username to use for authentication to the remote_write API. - - ``: The password to use for authentication to the remote_write API. + - _``_: The URL of the Prometheus remote_write-compatible server to send metrics to. + - _``_: The username to use for authentication to the remote_write API. + - _``_: The password to use for authentication to the remote_write API. ### Windows hosts @@ -198,9 +198,9 @@ prometheus.remote_write "demo" { } ``` Replace the following: - - ``: The URL of the Prometheus remote_write-compatible server to send metrics to. - - ``: The username to use for authentication to the remote_write API. - - ``: The password to use for authentication to the remote_write API. + - _``_: The URL of the Prometheus remote_write-compatible server to send metrics to. + - _``_: The username to use for authentication to the remote_write API. + - _``_: The password to use for authentication to the remote_write API. {{% admonition type="note" %}} This example requires the "Expose daemon on tcp://localhost:2375 without TLS" setting to be enabled in the Docker Engine settings. diff --git a/docs/sources/flow/reference/components/discovery.dockerswarm.md b/docs/sources/flow/reference/components/discovery.dockerswarm.md index bf4eef2074e8..fc4f27f9c428 100644 --- a/docs/sources/flow/reference/components/discovery.dockerswarm.md +++ b/docs/sources/flow/reference/components/discovery.dockerswarm.md @@ -30,28 +30,26 @@ The following arguments are supported: | ------------------ | -------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------- | -------- | | `host` | `string` | Address of the Docker daemon. | | yes | | `role` | `string` | Role of the targets to retrieve. Must be `services`, `tasks`, or `nodes`. | | yes | +| `enable_http2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no | +| `follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no | | `port` | `number` | The port to scrape metrics from, when `role` is nodes, and for discovered tasks and services that don't have published ports. | `80` | no | -| `refresh_interval` | `duration` | Interval at which to refresh the list of targets. | `"60s"` | 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_http2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no | +| `refresh_interval` | `duration` | Interval at which to refresh the list of targets. | `"60s"` | no | ## Blocks -The following blocks are supported inside the definition of -`discovery.dockerswarm`: +The following blocks are supported inside the definition of `discovery.dockerswarm`: | Hierarchy | Block | Description | Required | | ------------------- | ----------------- | ---------------------------------------------------------------------------------- | -------- | -| filter | [filter][] | Optional filter to limit the discovery process to a subset of available resources. | no | -| basic_auth | [basic_auth][] | Configure basic_auth for authenticating to the endpoint. | no | | authorization | [authorization][] | Configure generic authorization to the endpoint. | no | +| basic_auth | [basic_auth][] | Configure basic_auth for authenticating to the endpoint. | no | +| filter | [filter][] | Optional filter to limit the discovery process to a subset of available resources. | no | | oauth2 | [oauth2][] | Configure OAuth2 for authenticating to the endpoint. | no | | oauth2 > tls_config | [tls_config][] | Configure TLS settings for connecting to the endpoint. | no | -The `>` symbol indicates deeper levels of nesting. For example, -`oauth2 > tls_config` refers to a `tls_config` block defined inside -an `oauth2` block. +The `>` symbol indicates deeper levels of nesting. +For example, `oauth2 > tls_config` refers to a `tls_config` block defined inside an `oauth2` block. [filter]: #filter-block [basic_auth]: #basic_auth-block @@ -59,10 +57,17 @@ an `oauth2` block. [oauth2]: #oauth2-block [tls_config]: #tls_config-block +### authorization block + +{{< docs/shared lookup="flow/reference/components/authorization-block.md" source="agent" version="" >}} +### basic_auth block + +{{< docs/shared lookup="flow/reference/components/basic-auth-block.md" source="agent" version="" >}} + ### filter block Filters can be used to limit the discovery process to a subset of available resources. -It is possible to define multiple `filter` blocks within the `discovery.dockerswarm` block. +It's possible to define multiple `filter` blocks within the `discovery.dockerswarm` block. The list of available filters depends on the `role`: - [services filters](https://docs.docker.com/engine/api/v1.40/#operation/ServiceList) @@ -76,19 +81,11 @@ The following arguments can be used to configure a filter. | `name` | `string` | Name of the filter. | | yes | | `values` | `list(string)` | List of values associated with the filter. | | yes | -### basic_auth block - -{{< docs/shared lookup="flow/reference/components/basic-auth-block.md" source="agent" version="" >}} - -### authorization block - -{{< docs/shared lookup="flow/reference/components/authorization-block.md" source="agent" version="" >}} - ### oauth2 block {{< docs/shared lookup="flow/reference/components/oauth2-block.md" source="agent" version="" >}} -### tls_config block +### oauth2 > tls_config block {{< docs/shared lookup="flow/reference/components/tls-config-block.md" source="agent" version="" >}} @@ -110,21 +107,21 @@ The `services` role discovers all [Swarm services](https://docs.docker.com/engin Available meta labels: -- `__meta_dockerswarm_service_id`: the ID of the service. -- `__meta_dockerswarm_service_name`: the name of the service. -- `__meta_dockerswarm_service_mode`: the mode of the service. +- `__meta_dockerswarm_network_id`: the ID of the network. +- `__meta_dockerswarm_network_ingress`: whether the network is ingress. +- `__meta_dockerswarm_network_internal`: whether the network is internal. +- `__meta_dockerswarm_network_label_`: each label of the network. +- `__meta_dockerswarm_network_name`: the name of the network. +- `__meta_dockerswarm_network_scope`: the scope of the network. - `__meta_dockerswarm_service_endpoint_port_name`: the name of the endpoint port, if available. - `__meta_dockerswarm_service_endpoint_port_publish_mode`: the publish mode of the endpoint port. +- `__meta_dockerswarm_service_id`: the ID of the service. - `__meta_dockerswarm_service_label_`: each label of the service. +- `__meta_dockerswarm_service_mode`: the mode of the service. +- `__meta_dockerswarm_service_name`: the name of the service. - `__meta_dockerswarm_service_task_container_hostname`: the container hostname of the target, if available. - `__meta_dockerswarm_service_task_container_image`: the container image of the target. - `__meta_dockerswarm_service_updating_status`: the status of the service, if available. -- `__meta_dockerswarm_network_id`: the ID of the network. -- `__meta_dockerswarm_network_name`: the name of the network. -- `__meta_dockerswarm_network_ingress`: whether the network is ingress. -- `__meta_dockerswarm_network_internal`: whether the network is internal. -- `__meta_dockerswarm_network_label_`: each label of the network. -- `__meta_dockerswarm_network_scope`: the scope of the network. ### tasks @@ -133,32 +130,32 @@ The `tasks` role discovers all [Swarm tasks](https://docs.docker.com/engine/swar Available meta labels: - `__meta_dockerswarm_container_label_`: each label of the container. -- `__meta_dockerswarm_task_id`: the ID of the task. -- `__meta_dockerswarm_task_container_id`: the container ID of the task. -- `__meta_dockerswarm_task_desired_state`: the desired state of the task. -- `__meta_dockerswarm_task_slot`: the slot of the task. -- `__meta_dockerswarm_task_state`: the state of the task. -- `__meta_dockerswarm_task_port_publish_mode`: the publish mode of the task port. -- `__meta_dockerswarm_service_id`: the ID of the service. -- `__meta_dockerswarm_service_name`: the name of the service. -- `__meta_dockerswarm_service_mode`: the mode of the service. -- `__meta_dockerswarm_service_label_`: each label of the service. - `__meta_dockerswarm_network_id`: the ID of the network. -- `__meta_dockerswarm_network_name`: the name of the network. - `__meta_dockerswarm_network_ingress`: whether the network is ingress. - `__meta_dockerswarm_network_internal`: whether the network is internal. - `__meta_dockerswarm_network_label_`: each label of the network. - `__meta_dockerswarm_network_label`: each label of the network. +- `__meta_dockerswarm_network_name`: the name of the network. - `__meta_dockerswarm_network_scope`: the scope of the network. -- `__meta_dockerswarm_node_id`: the ID of the node. -- `__meta_dockerswarm_node_hostname`: the hostname of the node. - `__meta_dockerswarm_node_address`: the address of the node. - `__meta_dockerswarm_node_availability`: the availability of the node. +- `__meta_dockerswarm_node_hostname`: the hostname of the node. +- `__meta_dockerswarm_node_id`: the ID of the node. - `__meta_dockerswarm_node_label_`: each label of the node. - `__meta_dockerswarm_node_platform_architecture`: the architecture of the node. - `__meta_dockerswarm_node_platform_os`: the operating system of the node. - `__meta_dockerswarm_node_role`: the role of the node. - `__meta_dockerswarm_node_status`: the status of the node. +- `__meta_dockerswarm_service_id`: the ID of the service. +- `__meta_dockerswarm_service_label_`: each label of the service. +- `__meta_dockerswarm_service_mode`: the mode of the service. +- `__meta_dockerswarm_service_name`: the name of the service. +- `__meta_dockerswarm_task_container_id`: the container ID of the task. +- `__meta_dockerswarm_task_desired_state`: the desired state of the task. +- `__meta_dockerswarm_task_id`: the ID of the task. +- `__meta_dockerswarm_task_port_publish_mode`: the publish mode of the task port. +- `__meta_dockerswarm_task_slot`: the slot of the task. +- `__meta_dockerswarm_task_state`: the state of the task. The `__meta_dockerswarm_network_*` meta labels are not populated for ports which are published with mode=host. @@ -190,11 +187,11 @@ values. ## Debug information -`discovery.dockerswarm` does not expose any component-specific debug information. +`discovery.dockerswarm` doesn't expose any component-specific debug information. ## Debug metrics -`discovery.dockerswarm` does not expose any component-specific debug metrics. +`discovery.dockerswarm` doesn't expose any component-specific debug metrics. ## Example @@ -223,11 +220,11 @@ prometheus.scrape "demo" { prometheus.remote_write "demo" { endpoint { - url = PROMETHEUS_REMOTE_WRITE_URL + url = basic_auth { - username = USERNAME - password = PASSWORD + username = + password = } } } @@ -235,6 +232,6 @@ prometheus.remote_write "demo" { Replace the following: -- `PROMETHEUS_REMOTE_WRITE_URL`: The URL of the Prometheus remote_write-compatible server to send metrics to. -- `USERNAME`: The username to use for authentication to the remote_write API. -- `PASSWORD`: The password to use for authentication to the remote_write API. +- _``_: The URL of the Prometheus remote_write-compatible server to send metrics to. +- _``_: The username to use for authentication to the remote_write API. +- _``_: The password to use for authentication to the remote_write API. diff --git a/docs/sources/flow/reference/components/discovery.ec2.md b/docs/sources/flow/reference/components/discovery.ec2.md index 63a4cfc802f4..b137e533cdf0 100644 --- a/docs/sources/flow/reference/components/discovery.ec2.md +++ b/docs/sources/flow/reference/components/discovery.ec2.md @@ -26,25 +26,24 @@ discovery.ec2 "LABEL" { The following arguments are supported: -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`endpoint` | `string` | Custom endpoint to be used.| | no -`region` | `string` | The AWS region. If blank, the region from the instance metadata is used. | | no -`access_key` | `string` | The AWS API key ID. If blank, the environment variable `AWS_ACCESS_KEY_ID` is used. | | no -`secret_key` | `string` | The AWS API key secret. If blank, the environment variable `AWS_SECRET_ACCESS_KEY` is used. | | no -`profile` | `string` | Named AWS profile used to connect to the API. | | no -`role_arn` | `string` | AWS Role Amazon Resource Name (ARN), an alternative to using AWS API keys. | | no -`refresh_interval` | `string` | Refresh interval to re-read the instance list. | 60s | no -`port` | `int` | The port to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule. | 80 | no +Name | Type | Description | Default | Required +-------------------|----------|-------------------------------------------------------------------------------------------------------------------------|---------|--------- +`access_key` | `string` | The AWS API key ID. If blank, the environment variable `AWS_ACCESS_KEY_ID` is used. | | no +`endpoint` | `string` | Custom endpoint to be used. | | no +`port` | `int` | The port to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule. | 80 | no +`profile` | `string` | Named AWS profile used to connect to the API. | | no +`refresh_interval` | `string` | Refresh interval to re-read the instance list. | 60s | no +`region` | `string` | The AWS region. If blank, the region from the instance metadata is used. | | no +`role_arn` | `string` | AWS Role Amazon Resource Name (ARN), an alternative to using AWS API keys. | | no +`secret_key` | `string` | The AWS API key secret. If blank, the environment variable `AWS_SECRET_ACCESS_KEY` is used. | | no ## Blocks -The following blocks are supported inside the definition of -`discovery.ec2`: +The following blocks are supported inside the definition of `discovery.ec2`: -Hierarchy | Block | Description | Required ---------- | ----- | ----------- | -------- -filter | [filter][] | Filters discoverable resources. | no +Hierarchy | Block | Description | Required +----------|------------|---------------------------------|--------- +filter | [filter][] | Filters discoverable resources. | no [filter]: #filter-block @@ -53,10 +52,10 @@ filter | [filter][] | Filters discoverable resources. | no Filters can be used optionally to filter the instance list by other criteria. Available filter criteria can be found in the [Amazon EC2 documentation](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html). -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`name` | `string` | Filter name to use. | | yes -`values` | `list(string)` | Values to pass to the filter. | | yes +Name | Type | Description | Default | Required +---------|----------------|-------------------------------|---------|--------- +`name` | `string` | Filter name to use. | | yes +`values` | `list(string)` | Values to pass to the filter. | | yes Refer to the [Filter API AWS EC2 documentation][filter api] for the list of supported filters and their descriptions. @@ -66,16 +65,16 @@ Refer to the [Filter API AWS EC2 documentation][filter api] for the list of supp The following fields are exported and can be referenced by other components: -Name | Type | Description ----- | ---- | ----------- +Name | Type | Description +----------|---------------------|----------------------------------- `targets` | `list(map(string))` | The set of discovered EC2 targets. Each target includes the following labels: * `__meta_ec2_ami`: The EC2 Amazon Machine Image. * `__meta_ec2_architecture`: The architecture of the instance. -* `__meta_ec2_availability_zone`: The availability zone in which the instance is running. * `__meta_ec2_availability_zone_id`: The availability zone ID in which the instance is running (requires `ec2:DescribeAvailabilityZones`). +* `__meta_ec2_availability_zone`: The availability zone in which the instance is running. * `__meta_ec2_instance_id`: The EC2 instance ID. * `__meta_ec2_instance_lifecycle`: The lifecycle of the EC2 instance, set only for 'spot' or 'scheduled' instances, absent otherwise. * `__meta_ec2_instance_state`: The state of the EC2 instance. @@ -95,17 +94,16 @@ Each target includes the following labels: ## Component health -`discovery.ec2` is only reported as unhealthy when given an invalid -configuration. In those cases, exported fields retain their last healthy -values. +`discovery.ec2` is only reported as unhealthy when given an invalid configuration. +In those cases, exported fields retain their last healthy values. ## Debug information -`discovery.ec2` does not expose any component-specific debug information. +`discovery.ec2` doesn't expose any component-specific debug information. ## Debug metrics -`discovery.ec2` does not expose any component-specific debug metrics. +`discovery.ec2` doesn't expose any component-specific debug metrics. ## Example @@ -121,16 +119,16 @@ prometheus.scrape "demo" { prometheus.remote_write "demo" { endpoint { - url = PROMETHEUS_REMOTE_WRITE_URL + url = basic_auth { - username = USERNAME - password = PASSWORD + username = + password = } } } ``` Replace the following: - - `PROMETHEUS_REMOTE_WRITE_URL`: The URL of the Prometheus remote_write-compatible server to send metrics to. - - `USERNAME`: The username to use for authentication to the remote_write API. - - `PASSWORD`: The password to use for authentication to the remote_write API. + - _``_: The URL of the Prometheus remote_write-compatible server to send metrics to. + - _``_: The username to use for authentication to the remote_write API. + - _``_: The password to use for authentication to the remote_write API. diff --git a/docs/sources/flow/reference/components/discovery.eureka.md b/docs/sources/flow/reference/components/discovery.eureka.md index b2f7e73ad85c..d59c286975bc 100644 --- a/docs/sources/flow/reference/components/discovery.eureka.md +++ b/docs/sources/flow/reference/components/discovery.eureka.md @@ -35,38 +35,36 @@ Name | Type | Description `follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no ## Blocks -The following blocks are supported inside the definition of -`discovery.eureka`: +The following blocks are supported inside the definition of `discovery.eureka`: -Hierarchy | Block | Description | Required ---------- | ----- | ----------- | -------- -basic_auth | [basic_auth][] | Configure basic_auth for authenticating to the endpoint. | no -authorization | [authorization][] | Configure generic authorization to the endpoint. | no -oauth2 | [oauth2][] | Configure OAuth2 for authenticating to the endpoint. | no -oauth2 > tls_config | [tls_config][] | Configure TLS settings for connecting to the endpoint. | no +Hierarchy | Block | Description | Required +--------------------|-------------------|----------------------------------------------------------|--------- +authorization | [authorization][] | Configure generic authorization to the endpoint. | no +basic_auth | [basic_auth][] | Configure basic_auth for authenticating to the endpoint. | no +oauth2 | [oauth2][] | Configure OAuth2 for authenticating to the endpoint. | no +oauth2 > tls_config | [tls_config][] | Configure TLS settings for connecting to the endpoint. | no -The `>` symbol indicates deeper levels of nesting. For example, -`oauth2 > tls_config` refers to a `tls_config` block defined inside -an `oauth2` block. +The `>` symbol indicates deeper levels of nesting. +For example, `oauth2 > tls_config` refers to a `tls_config` block defined inside an `oauth2` block. [basic_auth]: #basic_auth-block [authorization]: #authorization-block [oauth2]: #oauth2-block [tls_config]: #tls_config-block -### basic_auth block +### authorization -{{< docs/shared lookup="flow/reference/components/basic-auth-block.md" source="agent" version="" >}} +{{< docs/shared lookup="flow/reference/components/authorization-block.md" source="agent" version="" >}} -### authorization block +### basic_auth -{{< docs/shared lookup="flow/reference/components/authorization-block.md" source="agent" version="" >}} +{{< docs/shared lookup="flow/reference/components/basic-auth-block.md" source="agent" version="" >}} -### oauth2 block +### oauth2 {{< docs/shared lookup="flow/reference/components/oauth2-block.md" source="agent" version="" >}} -### tls_config block +### oauth2 > tls_config {{< docs/shared lookup="flow/reference/components/tls-config-block.md" source="agent" version="" >}} @@ -81,37 +79,36 @@ Name | Type | Description Each target includes the following labels: * `__meta_eureka_app_name` -* `__meta_eureka_app_instance_hostname` -* `__meta_eureka_app_instance_homepage_url` -* `__meta_eureka_app_instance_statuspage_url` +* `__meta_eureka_app_instance_country_id` +* `__meta_eureka_app_instance_datacenterinfo_metadata_` +* `__meta_eureka_app_instance_datacenterinfo_name` * `__meta_eureka_app_instance_healthcheck_url` +* `__meta_eureka_app_instance_homepage_url` +* `__meta_eureka_app_instance_hostname` +* `__meta_eureka_app_instance_id` * `__meta_eureka_app_instance_ip_addr` -* `__meta_eureka_app_instance_vip_address` -* `__meta_eureka_app_instance_secure_vip_address` -* `__meta_eureka_app_instance_status` -* `__meta_eureka_app_instance_port` +* `__meta_eureka_app_instance_metadata_` * `__meta_eureka_app_instance_port_enabled` -* `__meta_eureka_app_instance_secure_port` +* `__meta_eureka_app_instance_port` * `__meta_eureka_app_instance_secure_port_enabled` -* `__meta_eureka_app_instance_datacenterinfo_name` -* `__meta_eureka_app_instance_datacenterinfo_metadata_` -* `__meta_eureka_app_instance_country_id` -* `__meta_eureka_app_instance_id` -* `__meta_eureka_app_instance_metadata_` +* `__meta_eureka_app_instance_secure_port` +* `__meta_eureka_app_instance_secure_vip_address` +* `__meta_eureka_app_instance_status` +* `__meta_eureka_app_instance_statuspage_url` +* `__meta_eureka_app_instance_vip_address` ## Component health -`discovery.eureka` is only reported as unhealthy when given an invalid -configuration. In those cases, exported fields retain their last healthy -values. +`discovery.eureka` is only reported as unhealthy when given an invalid configuration. +In those cases, exported fields retain their last healthy values. ## Debug information -`discovery.eureka` does not expose any component-specific debug information. +`discovery.eureka` doesn't expose any component-specific debug information. ## Debug metrics -`discovery.eureka` does not expose any component-specific debug metrics. +`discovery.eureka` doesn't expose any component-specific debug metrics. ## Example @@ -127,16 +124,16 @@ prometheus.scrape "demo" { prometheus.remote_write "demo" { endpoint { - url = PROMETHEUS_REMOTE_WRITE_URL + url = basic_auth { - username = USERNAME - password = PASSWORD + username = + password = } } } ``` Replace the following: - - `PROMETHEUS_REMOTE_WRITE_URL`: The URL of the Prometheus remote_write-compatible server to send metrics to. - - `USERNAME`: The username to use for authentication to the remote_write API. - - `PASSWORD`: The password to use for authentication to the remote_write API. + - _``_: The URL of the Prometheus remote_write-compatible server to send metrics to. + - _``_: The username to use for authentication to the remote_write API. + - _``_: The password to use for authentication to the remote_write API. diff --git a/docs/sources/flow/reference/components/discovery.file.md b/docs/sources/flow/reference/components/discovery.file.md index 402406ee32fd..7d72ed38f9dc 100644 --- a/docs/sources/flow/reference/components/discovery.file.md +++ b/docs/sources/flow/reference/components/discovery.file.md @@ -37,17 +37,17 @@ The following arguments are supported: Name | Type | Description | Default | Required ------------------ | ------------------- | ------------------------------------------ |---------| -------- -`files` | `list(string)` | Files to read and discover targets from. | | yes +`files` | `list(string)` | Files to read and discover targets from. | | yes `refresh_interval` | `duration` | How often to sync targets. | "5m" | no -The last path segment of each element in `files` may contain a single * that matches any character sequence, e.g. `my/path/tg_*.json`. +The last path segment of each element in `files` may contain a single * that matches any character sequence, for example, `my/path/tg_*.json`. ## Exported fields The following fields are exported and can be referenced by other components: Name | Type | Description ---------- | ------------------- | ----------- +----------|---------------------|--------------------------------------------------- `targets` | `list(map(string))` | The set of targets discovered from the filesystem. Each target includes the following labels: @@ -56,17 +56,16 @@ Each target includes the following labels: ## Component health -`discovery.file` is only reported as unhealthy when given an invalid -configuration. In those cases, exported fields retain their last healthy -values. +`discovery.file` is only reported as unhealthy when given an invalid configuration. +In those cases, exported fields retain their last healthy values. ## Debug information -`discovery.file` does not expose any component-specific debug information. +`discovery.file` doesn't expose any component-specific debug information. ## Debug metrics -`discovery.file` does not expose any component-specific debug metrics. +`discovery.file` doesn't expose any component-specific debug metrics. ## Examples @@ -102,8 +101,7 @@ values. ### Basic file discovery -This example discovers targets from a single file, scrapes them, and writes metrics -to a Prometheus remote write endpoint. +This example discovers targets from a single file, scrapes them, and writes metrics to a Prometheus remote write endpoint. ```river discovery.file "example" { @@ -117,25 +115,24 @@ prometheus.scrape "default" { prometheus.remote_write "demo" { endpoint { - url = PROMETHEUS_REMOTE_WRITE_URL + url = basic_auth { - username = USERNAME - password = PASSWORD + username = + password = } } } ``` Replace the following: - - `PROMETHEUS_REMOTE_WRITE_URL`: The URL of the Prometheus remote_write-compatible server to send metrics to. - - `USERNAME`: The username to use for authentication to the remote_write API. - - `PASSWORD`: The password to use for authentication to the remote_write API. + - _``_: The URL of the Prometheus remote_write-compatible server to send metrics to. + - _``_: The username to use for authentication to the remote_write API. + - _``_: The password to use for authentication to the remote_write API. ### File discovery with retained file path label -This example discovers targets from a wildcard file path, scrapes them, and writes metrics -to a Prometheus remote write endpoint. +This example discovers targets from a wildcard file path, scrapes them, and writes metrics to a Prometheus remote write endpoint. It also uses a relabeling rule to retain the file path as a label on each target. @@ -159,17 +156,17 @@ prometheus.scrape "default" { prometheus.remote_write "demo" { endpoint { - url = PROMETHEUS_REMOTE_WRITE_URL + url = basic_auth { - username = USERNAME - password = PASSWORD + username = + password = } } } ``` Replace the following: - - `PROMETHEUS_REMOTE_WRITE_URL`: The URL of the Prometheus remote_write-compatible server to send metrics to. - - `USERNAME`: The username to use for authentication to the remote_write API. - - `PASSWORD`: The password to use for authentication to the remote_write API. \ No newline at end of file + - _``_: The URL of the Prometheus remote_write-compatible server to send metrics to. + - _``_: The username to use for authentication to the remote_write API. + - _``_: The password to use for authentication to the remote_write API. \ No newline at end of file diff --git a/docs/sources/flow/reference/components/discovery.gce.md b/docs/sources/flow/reference/components/discovery.gce.md index b7ca49aaf0e3..0f3a368c4351 100644 --- a/docs/sources/flow/reference/components/discovery.gce.md +++ b/docs/sources/flow/reference/components/discovery.gce.md @@ -11,15 +11,17 @@ title: discovery.gce # discovery.gce -`discovery.gce` allows retrieving scrape targets from [Google Compute Engine](https://cloud.google.com/compute) (GCE) instances. The private IP address is used by default, but may be changed to the public IP address with relabeling. +`discovery.gce` allows retrieving scrape targets from [Google Compute Engine](https://cloud.google.com/compute) (GCE) instances. +The private IP address is used by default, but may be changed to the public IP address with relabeling. Credentials are discovered by the Google Cloud SDK default client by looking in the following places, preferring the first location found: -1. a JSON file specified by the `GOOGLE_APPLICATION_CREDENTIALS` environment variable. -2. a JSON file in the well-known path `$HOME/.config/gcloud/application_default_credentials.json`. -3. fetched from the GCE metadata server. +1. A JSON file specified by the `GOOGLE_APPLICATION_CREDENTIALS` environment variable. +1. A JSON file in the well-known path `$HOME/.config/gcloud/application_default_credentials.json`. +1. Fetched from the GCE metadata server. -If the Agent is running within GCE, the service account associated with the instance it is running on should have at least read-only permissions to the compute resources. If running outside of GCE make sure to create an appropriate service account and place the credential file in one of the expected locations. +If the Agent is running within GCE, the service account associated with the instance it's running on should have at least read-only permissions to the compute resources. +If running outside of GCE make sure to create an appropriate service account and place the credential file in one of the expected locations. ## Usage @@ -35,14 +37,14 @@ discovery.gce "LABEL" { The following arguments are supported: -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`project` | `string` | The GCP Project.| | yes -`zone` | `string` | The zone of the scrape targets. | | yes -`filter` | `string` | Filter can be used optionally to filter the instance list by other criteria. | | no -`refresh_interval` | `duration` | Refresh interval to re-read the instance list. | `"60s"`| no -`port` | `int` | The port to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule. | `80`| no -`tag_separator` | `string` | The tag separator is used to separate the tags on concatenation. | `","`| no +Name | Type | Description | Default | Required +-------------------|------------|-------------------------------------------------------------------------------------------------------------------------|---------|--------- +`project` | `string` | The GCP Project. | | yes +`zone` | `string` | The zone of the scrape targets. | | yes +`filter` | `string` | Filter can be used optionally to filter the instance list by other criteria. | | no +`port` | `int` | The port to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule. | `80` | no +`refresh_interval` | `duration` | Refresh interval to re-read the instance list. | `"60s"` | no +`tag_separator` | `string` | The tag separator is used to separate the tags on concatenation. | `","` | no For more information on the syntax of the `filter` argument, refer to Google's `filter` documentation for [Method: instances.list](https://cloud.google.com/compute/docs/reference/latest/instances/list). @@ -50,20 +52,20 @@ For more information on the syntax of the `filter` argument, refer to Google's ` The following fields are exported and can be referenced by other components: -Name | Type | Description ----- | ---- | ----------- +Name | Type | Description +----------|---------------------|----------------------------------- `targets` | `list(map(string))` | The set of discovered GCE targets. Each target includes the following labels: * `__meta_gce_instance_id`: the numeric id of the instance * `__meta_gce_instance_name`: the name of the instance +* `__meta_gce_interface_ipv4_NAME`: IPv4 address of each named interface * `__meta_gce_label_LABEL_NAME`: each GCE label of the instance * `__meta_gce_machine_type`: full or partial URL of the machine type of the instance * `__meta_gce_metadata_NAME`: each metadata item of the instance * `__meta_gce_network`: the network URL of the instance * `__meta_gce_private_ip`: the private IP address of the instance -* `__meta_gce_interface_ipv4_NAME`: IPv4 address of each named interface * `__meta_gce_project`: the GCP project in which the instance is running * `__meta_gce_public_ip`: the public IP address of the instance, if present * `__meta_gce_subnetwork`: the subnetwork URL of the instance @@ -73,17 +75,16 @@ Each target includes the following labels: ## Component health -`discovery.gce` is only reported as unhealthy when given an invalid -configuration. In those cases, exported fields retain their last healthy -values. +`discovery.gce` is only reported as unhealthy when given an invalid configuration. +In those cases, exported fields retain their last healthy values. ## Debug information -`discovery.gce` does not expose any component-specific debug information. +`discovery.gce` doesn't expose any component-specific debug information. ## Debug metrics -`discovery.gce` does not expose any component-specific debug metrics. +`discovery.gce` doesn't expose any component-specific debug metrics. ## Example @@ -100,16 +101,16 @@ prometheus.scrape "demo" { prometheus.remote_write "demo" { endpoint { - url = PROMETHEUS_REMOTE_WRITE_URL + url = basic_auth { - username = USERNAME - password = PASSWORD + username = + password = } } } ``` Replace the following: - - `PROMETHEUS_REMOTE_WRITE_URL`: The URL of the Prometheus remote_write-compatible server to send metrics to. - - `USERNAME`: The username to use for authentication to the remote_write API. - - `PASSWORD`: The password to use for authentication to the remote_write API. \ No newline at end of file + - _``_: The URL of the Prometheus remote_write-compatible server to send metrics to. + - _``_: The username to use for authentication to the remote_write API. + - _``_: The password to use for authentication to the remote_write API. diff --git a/docs/sources/flow/reference/components/discovery.hetzner.md b/docs/sources/flow/reference/components/discovery.hetzner.md index 1cf7f5c6ff72..d3d3bf940498 100644 --- a/docs/sources/flow/reference/components/discovery.hetzner.md +++ b/docs/sources/flow/reference/components/discovery.hetzner.md @@ -29,62 +29,60 @@ discovery.hetzner "LABEL" { The following arguments are supported: -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`role` | `string` | Hetzner role of entities that should be discovered. | | yes -`port` | `int` | The port to scrape metrics from. | `80` | no -`refresh_interval` | `duration` | The time after which the servers are refreshed. | `"60s"` | no -`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_http2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no +Name | Type | Description | Default | Required +--------------------|------------|--------------------------------------------------------------|---------|--------- +`role` | `string` | Hetzner role of entities that should be discovered. | | yes +`bearer_token_file` | `string` | File containing a bearer token to authenticate with. | | no +`bearer_token` | `secret` | Bearer token to authenticate with. | | no +`enable_http2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no +`follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no +`port` | `int` | The port to scrape metrics from. | `80` | no +`proxy_url` | `string` | HTTP proxy to proxy requests through. | | no +`refresh_interval` | `duration` | The time after which the servers are refreshed. | `"60s"` | no `role` must be one of `robot` or `hcloud`. - You can provide one of the following arguments for authentication: - - [`bearer_token` argument](#arguments). - - [`bearer_token_file` argument](#arguments). - - [`basic_auth` block][basic_auth]. - - [`authorization` block][authorization]. - - [`oauth2` block][oauth2]. +You can provide one of the following arguments for authentication: +- [`authorization` block][authorization]. +- [`basic_auth` block][basic_auth]. +- [`bearer_token_file` argument](#arguments). +- [`bearer_token` argument](#arguments). +- [`oauth2` block][oauth2]. [arguments]: #arguments ## Blocks -The following blocks are supported inside the definition of -`discovery.hetzner`: +The following blocks are supported inside the definition of `discovery.hetzner`: -Hierarchy | Block | Description | Required ---------- | ----- | ----------- | -------- -basic_auth | [basic_auth][] | Configure basic_auth for authenticating to the endpoint. | no -authorization | [authorization][] | Configure generic authorization to the endpoint. | no -oauth2 | [oauth2][] | Configure OAuth2 for authenticating to the endpoint. | no -oauth2 > tls_config | [tls_config][] | Configure TLS settings for connecting to the endpoint. | no +Hierarchy | Block | Description | Required +--------------------|-------------------|----------------------------------------------------------|--------- +authorization | [authorization][] | Configure generic authorization to the endpoint. | no +basic_auth | [basic_auth][] | Configure basic_auth for authenticating to the endpoint. | no +oauth2 | [oauth2][] | Configure OAuth2 for authenticating to the endpoint. | no +oauth2 > tls_config | [tls_config][] | Configure TLS settings for connecting to the endpoint. | no -The `>` symbol indicates deeper levels of nesting. For example, -`oauth2 > tls_config` refers to a `tls_config` block defined inside -an `oauth2` block. +The `>` symbol indicates deeper levels of nesting. +For example, `oauth2 > tls_config` refers to a `tls_config` block defined inside an `oauth2` block. [basic_auth]: #basic_auth-block [authorization]: #authorization-block [oauth2]: #oauth2-block [tls_config]: #tls_config-block -### basic_auth block +### authorization -{{< docs/shared lookup="flow/reference/components/basic-auth-block.md" source="agent" version="" >}} +{{< docs/shared lookup="flow/reference/components/authorization-block.md" source="agent" version="" >}} -### authorization block +### basic_auth -{{< docs/shared lookup="flow/reference/components/authorization-block.md" source="agent" version="" >}} +{{< docs/shared lookup="flow/reference/components/basic-auth-block.md" source="agent" version="" >}} -### oauth2 block +### oauth2 {{< docs/shared lookup="flow/reference/components/oauth2-block.md" source="agent" version="" >}} -### tls_config block +### oauth2 > tls_config {{< docs/shared lookup="flow/reference/components/tls-config-block.md" source="agent" version="" >}}