Skip to content

Commit

Permalink
Linting updates and edits
Browse files Browse the repository at this point in the history
  • Loading branch information
clayton-cornell committed Jan 14, 2025
1 parent a9e00ee commit 5829494
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 38 deletions.
29 changes: 15 additions & 14 deletions docs/sources/reference/components/discovery/discovery.azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ 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
`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
`port` | `number` | Port to be appended to the `__address__` label for each target. | `80` | 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
`proxy_from_environment` | `bool` | Use the proxy URL indicated by environment variables. | `false` | no
`proxy_url` | `string` | HTTP proxy to send requests through. | | no
Expand All @@ -45,7 +45,7 @@ The following blocks are supported inside the definition of `discovery.azure`:
Hierarchy | Block | Description | Required
-----------------|----------------------|--------------------------------------------------|---------
managed_identity | [managed_identity][] | Managed Identity configuration for Azure API. | no
oauth | [oauth][] | OAuth 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.
Expand All @@ -64,13 +64,13 @@ Name | Type | Description | Default | Required

### oauth

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

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

Expand All @@ -90,17 +90,18 @@ Each target includes the following labels:
* `__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_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_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_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 @@ -152,8 +153,8 @@ Replace the following:
* _`<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.
* _`<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
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Name | Type | Description
`allow_stale` | `bool` | Allow stale Consul results. Reduces load on Consul. Refer to the [Consul documentation][] for more information. | `true` | no
`bearer_token_file` | `string` | File containing a bearer token to authenticate with. | | no
`bearer_token` | `secret` | Bearer token to authenticate with. | | no
`datacenter` | `string` | Datacenter to query. If not provided, the default is used. | | no
`datacenter` | `string` | Data center to query. If not provided, the default is used. | | 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
`namespace` | `string` | Namespace to use. Only supported in Consul Enterprise. | | no
Expand All @@ -53,8 +53,8 @@ Name | Type | Description

* [`authorization` block][authorization]
* [`basic_auth` block][basic_auth]
* [`bearer_token_file` argument](#arguments)
* [`bearer_token` argument](#arguments)
* [`bearer_token_file` argument][arguments]
* [`bearer_token` argument][arguments]
* [`oauth2` block][oauth2]

{{< docs/shared lookup="reference/components/http-client-proxy-config-description.md" source="alloy" version="<ALLOY_VERSION>" >}}
Expand Down Expand Up @@ -111,7 +111,7 @@ Each target includes the following labels:
* `__meta_consul_address`: The address of the target.
* `__meta_consul_metadata_<key>`: 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_partition`: The administrator 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_<key>`: Each service metadata key value of the target.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: discovery.consulagent
# discovery.consulagent

`discovery.consulagent` allows you to retrieve scrape targets from [Consul's Agent API][].
Only the services registered with the local agent running on the same host will be watched.
Only the services registered with the local agent running on the same host are watched.
This is suitable for very large Consul clusters for which using the Catalog API would be too slow or resource intensive.

[Consul's Agent API]: https://developer.hashicorp.com/consul/api-docs/agent
Expand All @@ -26,18 +26,18 @@ discovery.consulagent "<LABEL>" {

The following arguments are supported:

Name | Type | Description | Default | Required
-------------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------|------------------|---------
`datacenter` | `string` | Datacenter in which the Consul Agent is configured to run. If not provided, the datacenter is retrieved from the local Consul Agent. | | no
`password` | `secret` | The password to use. | | no
`refresh_interval` | `duration` | Frequency to refresh list of containers. | `"30s"` | no
`scheme` | `string` | The scheme to use when talking to the Consul Agent. | `http` | no
`server` | `string` | Host and port of the Consul Agent API. | `localhost:8500` | no
`services` | `list(string)` | A list of services for which targets are retrieved. If omitted, all services are scraped. | | no
`tag_separator` | `string` | The string by which Consul tags are joined into the tag label. | `,` | no
`tags` | `list(string)` | An optional list of tags used to filter nodes for a given service. Services must contain all tags in the list. | | no
`token` | `secret` | Secret token used to access the Consul Agent API. | | no
`username` | `string` | The username to use. | | no
Name | Type | Description | Default | Required
-------------------|----------------|----------------------------------------------------------------------------------------------------------------------------------------|------------------|---------
`datacenter` | `string` | Data center in which the Consul Agent is configured to run. If not provided, the data center is retrieved from the local Consul Agent. | | no
`password` | `secret` | The password to use. | | no
`refresh_interval` | `duration` | Frequency to refresh list of containers. | `"30s"` | no
`scheme` | `string` | The scheme to use when talking to the Consul Agent. | `http` | no
`server` | `string` | Host and port of the Consul Agent API. | `localhost:8500` | no
`services` | `list(string)` | A list of services for which targets are retrieved. If omitted, all services are scraped. | | no
`tag_separator` | `string` | The string by which Consul tags are joined into the tag label. | `,` | no
`tags` | `list(string)` | An optional list of tags used to filter nodes for a given service. Services must contain all tags in the list. | | no
`token` | `secret` | Secret token used to access the Consul Agent API. | | no
`username` | `string` | The username to use. | | no

## Blocks

Expand All @@ -64,7 +64,7 @@ Name | Type | Description
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_dc`: The data center name for the target.
* `__meta_consulagent_health`: The health status of the service.
* `__meta_consulagent_metadata_<key>`: Each node metadata key value of the target.
* `__meta_consulagent_node`: The node name defined for the target.
Expand Down Expand Up @@ -124,8 +124,8 @@ 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.
* _`<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
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ 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.
* _`<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
4 changes: 2 additions & 2 deletions docs/sources/reference/components/discovery/discovery.dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ 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.
* _`<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

0 comments on commit 5829494

Please sign in to comment.