Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and lint discover topics #2403

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 43 additions & 39 deletions docs/sources/reference/components/discovery/discovery.azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,56 +21,58 @@ discovery.azure "<LABEL>" {

## Arguments

The following arguments are supported:
You can use the following arguments with `discovery.azure`:

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` | The port 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="<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 2.0 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
[tls_config]: #tls_config-block

### oauth block
The `oauth` block configures OAuth authentication for the Azure API.
[managed_identity]: #managed_identity
[oauth]: #oauth
[tls_config]: #tls_config

Name | Type | Description | Default | Required
----------------|----------|----------------------|---------|---------
`client_id` | `string` | OAuth client ID. | | yes
`client_secret` | `string` | OAuth client secret. | | yes
`tenant_id` | `string` | OAuth tenant ID. | | yes
### managed_identity

### 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
### oauth

The `oauth` block configures OAuth 2.0 authentication for the Azure API.

Name | Type | Description | Default | Required
----------------|----------|--------------------------|---------|---------
`client_id` | `string` | OAuth 2.0 client ID. | | yes
`client_secret` | `string` | OAuth 2.0 client secret. | | yes
`tenant_id` | `string` | OAuth 2.0 tenant ID. | | yes

### tls_config

{{< docs/shared lookup="reference/components/tls-config-block.md" source="alloy" version="<ALLOY_VERSION>" >}}

Expand All @@ -84,21 +86,22 @@ 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_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_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_id`: The UUID of the Azure VM.
* `__meta_azure_machine_location`: The region the VM is in.
* `__meta_azure_machine_name`: The name of the VM.
* `__meta_azure_machine_os_type`: The OS the VM is running, either `Linux` or `Windows`.
* `__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 is 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.
Each discovered VM maps to a single target.
The `__address__` label is set to the `private_ip:port` of the VM if the private IP is an IPv4 address, or `[private_ip]:port` if the private IP of the VM is an IPv6 address.

## Component health

Expand Down Expand Up @@ -144,13 +147,14 @@ prometheus.remote_write "demo" {
```

Replace the following:
- _`<AZURE_SUBSCRIPTION_ID>`_: Your Azure subscription ID.
- _`<AZURE_CLIENT_ID>`_: Your Azure client ID.
- _`<AZURE_CLIENT_SECRET>`_: Your Azure client secret.
- _`<AZURE_TENANT_ID>`_: Your Azure tenant ID.
- _`<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.

* _`<AZURE_SUBSCRIPTION_ID>`_: Your Azure subscription ID.
* _`<AZURE_CLIENT_ID>`_: Your Azure client ID.
* _`<AZURE_CLIENT_SECRET>`_: Your Azure client secret.
* _`<AZURE_TENANT_ID>`_: Your Azure tenant ID.
* _`<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.

<!-- START GENERATED COMPATIBLE COMPONENTS -->

Expand Down
Loading
Loading