From 6f64b3ad931ea09ba0da6aaf823bfb8f5d83f15e Mon Sep 17 00:00:00 2001 From: Clayton Cornell Date: Mon, 13 Jan 2025 11:38:58 -0800 Subject: [PATCH 1/6] Update discover azure and consul topics --- .../components/discovery/discovery.azure.md | 69 ++++++++-------- .../components/discovery/discovery.consul.md | 74 ++++++++--------- .../discovery/discovery.consulagent.md | 79 +++++++++---------- 3 files changed, 113 insertions(+), 109 deletions(-) diff --git a/docs/sources/reference/components/discovery/discovery.azure.md b/docs/sources/reference/components/discovery/discovery.azure.md index 72c5123017..a2fb6000dc 100644 --- a/docs/sources/reference/components/discovery/discovery.azure.md +++ b/docs/sources/reference/components/discovery/discovery.azure.md @@ -25,36 +25,45 @@ The following arguments are supported: Name | Type | Description | Default | Required -------------------------|---------------------|--------------------------------------------------------------------------------------------------|----------------------|--------- +`enable_http2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no `environment` | `string` | Azure environment. | `"AzurePublicCloud"` | no -`port` | `number` | Port to be appended to the `__address__` label for each target. | `80` | no -`subscription_id` | `string` | Azure subscription ID. | | no -`refresh_interval` | `duration` | Interval at which to refresh the list of targets. | `5m` | no -`proxy_url` | `string` | HTTP proxy to send requests through. | | no +`follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no `no_proxy` | `string` | Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying. | | no -`proxy_from_environment` | `bool` | Use the proxy URL indicated by environment variables. | `false` | no +`port` | `number` | Port to be appended to the `__address__` label for each target. | `80` | no `proxy_connect_header` | `map(list(secret))` | Specifies headers to send to proxies during CONNECT requests. | | 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 +`proxy_from_environment` | `bool` | Use the proxy URL indicated by environment variables. | `false` | no +`proxy_url` | `string` | HTTP proxy to send requests through. | | no +`refresh_interval` | `duration` | Interval at which to refresh the list of targets. | `5m` | no +`subscription_id` | `string` | Azure subscription ID. | | no {{< docs/shared lookup="reference/components/http-client-proxy-config-description.md" source="alloy" version="" >}} ## Blocks -The following blocks are supported inside the definition of -`discovery.azure`: + +The following blocks are supported inside the definition of `discovery.azure`: Hierarchy | Block | Description | Required -----------------|----------------------|--------------------------------------------------|--------- -oauth | [oauth][] | OAuth configuration for Azure API. | no managed_identity | [managed_identity][] | Managed Identity configuration for Azure API. | no +oauth | [oauth][] | OAuth configuration for Azure API. | no tls_config | [tls_config][] | TLS configuration for requests to the Azure API. | no Exactly one of the `oauth` or `managed_identity` blocks must be specified. -[oauth]: #oauth-block [managed_identity]: #managed_identity-block +[oauth]: #oauth-block [tls_config]: #tls_config-block -### oauth block +### managed_identity + +The `managed_identity` block configures Managed Identity authentication for the Azure API. + +Name | Type | Description | Default | Required +------------|----------|-----------------------------|---------|--------- +`client_id` | `string` | Managed Identity client ID. | | yes + +### oauth + The `oauth` block configures OAuth authentication for the Azure API. Name | Type | Description | Default | Required @@ -63,14 +72,7 @@ Name | Type | Description | Default | Required `client_secret` | `string` | OAuth client secret. | | yes `tenant_id` | `string` | OAuth tenant ID. | | yes -### managed_identity block -The `managed_identity` block configures Managed Identity authentication for the Azure API. - -Name | Type | Description | Default | Required -------------|----------|-----------------------------|---------|--------- -`client_id` | `string` | Managed Identity client ID. | | yes - -### tls_config block +### tls_config {{< docs/shared lookup="reference/components/tls-config-block.md" source="alloy" version="" >}} @@ -84,19 +86,19 @@ Name | Type | Description Each target includes the following labels: -* `__meta_azure_subscription_id`: The Azure subscription ID. -* `__meta_azure_tenant_id`: The Azure tenant ID. +* `__meta_azure_machine_computer_name`: The host OS name of the VM. * `__meta_azure_machine_id`: The UUID of the Azure VM. -* `__meta_azure_machine_resource_group`: The name of the resource group the VM is in. +* `__meta_azure_machine_location`: The region the VM is in. * `__meta_azure_machine_name`: The name of the VM. -* `__meta_azure_machine_computer_name`: The host OS name of the VM. * `__meta_azure_machine_os_type`: The OS the VM is running (either `Linux` or `Windows`). -* `__meta_azure_machine_location`: The region the VM is in. * `__meta_azure_machine_private_ip`: The private IP address of the VM. * `__meta_azure_machine_public_ip`: The public IP address of the VM. -* `__meta_azure_machine_tag_*`: A tag on the VM. There will be one label per tag. +* `__meta_azure_machine_resource_group`: The name of the resource group the VM is in. * `__meta_azure_machine_scale_set`: The name of the scale set the VM is in. * `__meta_azure_machine_size`: The size of the VM. +* `__meta_azure_machine_tag_*`: A tag on the VM. There will be one label per tag. +* `__meta_azure_subscription_id`: The Azure subscription ID. +* `__meta_azure_tenant_id`: The Azure tenant ID. Each discovered VM maps to a single target. The `__address__` label is set to the `private_ip:port` (`[private_ip]:port` if the private IP is an IPv6 address) of the VM. @@ -144,13 +146,14 @@ 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/reference/components/discovery/discovery.consul.md b/docs/sources/reference/components/discovery/discovery.consul.md index f2d09557ed..53646c5829 100644 --- a/docs/sources/reference/components/discovery/discovery.consul.md +++ b/docs/sources/reference/components/discovery/discovery.consul.md @@ -8,15 +8,15 @@ title: discovery.consul # discovery.consul -`discovery.consul` allows retrieving scrape targets from [Consul's Catalog API][]. +`discovery.consul` allows you to retrieve scrape targets from [Consul's Catalog API][]. [Consul's Catalog API]: https://www.consul.io/use-cases/discover-services ## Usage ```alloy -discovery.consul "LABEL" { - server = CONSUL_SERVER +discovery.consul "