Skip to content

Commit

Permalink
Update nomad topic
Browse files Browse the repository at this point in the history
  • Loading branch information
clayton-cornell committed Jan 16, 2025
1 parent e8da6c1 commit e091584
Showing 1 changed file with 51 additions and 49 deletions.
100 changes: 51 additions & 49 deletions docs/sources/reference/components/discovery/discovery.nomad.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ title: discovery.nomad
## Usage

```alloy
discovery.nomad "LABEL" {
discovery.nomad "<LABEL>" {
}
```

Expand All @@ -23,66 +23,66 @@ The following arguments are supported:

Name | Type | Description | Default | Required
-------------------------|---------------------|--------------------------------------------------------------------------------------------------|-------------------------|---------
`server` | `string` | Address of nomad server. | `http://localhost:4646` | no
`namespace` | `string` | Nomad namespace to use. | `default` | no
`region` | `string` | Nomad region to use. | `global` | no
`allow_stale` | `bool` | Allow reading from non-leader nomad instances. | `true` | no
`tag_separator` | `string` | Seperator to join nomad tags into Prometheus labels. | `,` | no
`refresh_interval` | `duration` | Frequency to refresh list of containers. | `"30s"` | no
`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
`proxy_url` | `string` | HTTP proxy to send requests through. | | no
`namespace` | `string` | Nomad namespace to use. | `default` | 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
`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
`refresh_interval` | `duration` | Frequency to refresh list of containers. | `"30s"` | no
`region` | `string` | Nomad region to use. | `global` | no
`server` | `string` | Address of nomad server. | `http://localhost:4646` | no
`tag_separator` | `string` | Separator to join nomad tags into Prometheus labels. | `,` | no

At most, one of the following can be provided:
- [`bearer_token` argument](#arguments).
- [`bearer_token_file` argument](#arguments).
- [`basic_auth` block][basic_auth].
- [`authorization` block][authorization].
- [`oauth2` block][oauth2].

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

[arguments]: #arguments

{{< 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.nomad`:
The following blocks are supported inside the definition of `discovery.nomad`:

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

[basic_auth]: #basic_auth-block
[authorization]: #authorization-block
[oauth2]: #oauth2-block
[tls_config]: #tls_config-block
[authorization]: #authorization
[basic_auth]: #basic_auth
[oauth2]: #oauth2
[tls_config]: #tls_config

### basic_auth block
### authorization

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

### authorization block
### basic_auth

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

### oauth2 block
### oauth2

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

### tls_config block
### tls_config

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

Expand All @@ -96,15 +96,15 @@ Name | Type | Description

Each target includes the following labels:

* `__meta_nomad_address`: the service address of the target.
* `__meta_nomad_dc`: the datacenter name for the target.
* `__meta_nomad_namespace`: the namespace of the target.
* `__meta_nomad_node_id`: the node name defined for the target.
* `__meta_nomad_service`: the name of the service the target belongs to.
* `__meta_nomad_service_address`: the service address of the target.
* `__meta_nomad_service_id`: the service ID of the target.
* `__meta_nomad_service_port`: the service port of the target.
* `__meta_nomad_tags`: the list of tags of the target joined by the tag separator.
* `__meta_nomad_address`: The service address of the target.
* `__meta_nomad_dc`: The data center name for the target.
* `__meta_nomad_namespace`: The namespace of the target.
* `__meta_nomad_node_id`: The node name defined for the target.
* `__meta_nomad_service_address`: The service address of the target.
* `__meta_nomad_service_id`: The service ID of the target.
* `__meta_nomad_service_port`: The service port of the target.
* `__meta_nomad_service`: The name of the service the target belongs to.
* `__meta_nomad_tags`: The list of tags of the target joined by the tag separator.

## Component health

Expand All @@ -113,11 +113,11 @@ In those cases, exported fields retain their last healthy values.

## Debug information

`discovery.nomad` does not expose any component-specific debug information.
`discovery.nomad` doesn't expose any component-specific debug information.

## Debug metrics

`discovery.nomad` does not expose any component-specific debug metrics.
`discovery.nomad` doesn't expose any component-specific debug metrics.

## Example

Expand All @@ -134,19 +134,21 @@ prometheus.scrape "demo" {
prometheus.remote_write "demo" {
endpoint {
url = PROMETHEUS_REMOTE_WRITE_URL
url = <PROMETHEUS_REMOTE_WRITE_URL>
basic_auth {
username = USERNAME
password = PASSWORD
username = <USERNAME>
password = <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.

* _`<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

0 comments on commit e091584

Please sign in to comment.