Skip to content

Commit

Permalink
Clean up Vale errors in task topics (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
clayton-cornell authored Jun 19, 2024
1 parent 50114f9 commit 80c313d
Show file tree
Hide file tree
Showing 24 changed files with 472 additions and 483 deletions.
2 changes: 1 addition & 1 deletion docs/sources/concepts/configuration-syntax/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ local.file "token" {
All block and attribute definitions are followed by a newline, which {{< param "PRODUCT_NAME" >}} calls a _terminator_, as it terminates the current statement.

A newline is treated as a terminator when it follows any expression, `]`, `)`, or `}`.
{{< param "PRODUCT_NAME" >}} ignores other newlines and you can can enter as many newlines as you want.
{{< param "PRODUCT_NAME" >}} ignores other newlines and you can enter as many newlines as you want.

[identifier]: #identifiers
[identifier]: #identifiers
Expand Down
96 changes: 47 additions & 49 deletions docs/sources/reference/components/discovery.consul.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,30 @@ discovery.consul "LABEL" {

The following arguments are supported:

Name | Type | Description | Default | Required
-------------------------|---------------------|-------------------------------------------------------------------------------------------------------------------|------------------|---------
`server` | `string` | Host and port of the Consul API. | `localhost:8500` | no
`token` | `secret` | Secret token used to access the Consul API. | | no
`datacenter` | `string` | Datacenter to query. If not provided, the default is used. | | no
`namespace` | `string` | Namespace to use (only supported in Consul Enterprise). | | no
`partition` | `string` | Admin partition to use (only supported in Consul Enterprise). | | no
`tag_separator` | `string` | The string by which Consul tags are joined into the tag label. | `,` | no
`scheme` | `string` | The scheme to use when talking to Consul. | `http` | no
`username` | `string` | The username to use (deprecated in favor of the basic_auth configuration). | | no
`password` | `secret` | The password to use (deprecated in favor of the basic_auth configuration). | | no
`allow_stale` | `bool` | Allow stale Consul results (see [official documentation][consistency documentation]). Will reduce load on Consul. | `true` | no
`services` | `list(string)` | A list of services for which targets are retrieved. If omitted, all services are scraped. | | 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
`node_meta` | `map(string)` | Node metadata key/value pairs to filter nodes for a given service. | | 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
`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
Name | Type | Description | Default | Required
-------------------------|---------------------|-----------------------------------------------------------------------------------------------------------------|------------------|---------
`server` | `string` | Host and port of the Consul API. | `localhost:8500` | no
`token` | `secret` | Secret token used to access the Consul API. | | no
`datacenter` | `string` | Datacenter to query. If not provided, the default is used. | | no
`namespace` | `string` | Namespace to use. Only supported in Consul Enterprise. | | no
`partition` | `string` | Admin partition to use. Only supported in Consul Enterprise. | | no
`tag_separator` | `string` | The string by which Consul tags are joined into the tag label. | `,` | no
`scheme` | `string` | The scheme to use when talking to Consul. | `http` | no
`username` | `string` | The username to use. Deprecated in favor of the `basic_auth` configuration. | | no
`password` | `secret` | The password to use. Deprecated in favor of the `basic_auth` configuration. | | no
`allow_stale` | `bool` | Allow stale Consul results. Reduces load on Consul. Refer to the [Consul documentation][] for more information. | `true` | no
`services` | `list(string)` | A list of services for which targets are retrieved. If omitted, all services are scraped. | | 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
`node_meta` | `map(string)` | Node metadata key/value pairs to filter nodes for a given service. | | 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
`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

At most, one of the following can be provided:
- [`bearer_token` argument](#arguments).
Expand All @@ -56,21 +56,21 @@ Name | Type | Description

{{< docs/shared lookup="reference/components/http-client-proxy-config-description.md" source="alloy" version="<ALLOY_VERSION>" >}}

[consistency documentation]: https://www.consul.io/api/features/consistency.html
[Consul documentation]: https://www.consul.io/api/features/consistency.html
[arguments]: #arguments

## Blocks

The following blocks are supported inside the definition of
`discovery.consul`:

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

The `>` symbol indicates deeper levels of nesting.
For example, `oauth2 > tls_config` refers to a `tls_config` block defined inside an `oauth2` block.
Expand Down Expand Up @@ -106,19 +106,17 @@ 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_partition`: the admin partition name where the service is registered.
* `__meta_consul_metadata_<key>`: each node metadata key value of the target.
* `__meta_consul_node`: the node name defined for the target.
* `__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.
* `__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_<key>`: 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_partition`: The admin partition name where the service is registered.
* `__meta_consul_metadata_<key>`: Each node metadata key value of the target.
* `__meta_consul_node`: The node name defined for the target.
* `__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.
* `__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_<key>`: 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

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

## Debug information

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

## Debug metrics

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

## Example

Expand Down Expand Up @@ -164,8 +162,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
2 changes: 1 addition & 1 deletion docs/sources/reference/components/loki.process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ the stage should attempt to parse as a timestamp.

The `format` field defines _how_ that source should be parsed.

First off, the `format` can be set to one of the following shorthand values for commonly-used forms:
The `format` can be set to one of the following shorthand values for commonly used forms:

```
ANSIC: Mon Jan _2 15:04:05 2006
Expand Down
23 changes: 14 additions & 9 deletions docs/sources/reference/components/loki.source.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ loki.source.api "LABEL" {
}
```

The component will start HTTP server on the configured port and address with the following endpoints:
The component will start an HTTP server on the configured port and address with the following endpoints:

- `/loki/api/v1/push` - accepting `POST` requests compatible with [Loki push API][loki-push-api], for example, from another {{< param "PRODUCT_NAME" >}}'s [`loki.write`][loki.write] component.
- `/loki/api/v1/raw` - accepting `POST` requests with newline-delimited log lines in body. This can be used to send NDJSON or plaintext logs. This is compatible with promtail's push API endpoint - see [promtail's documentation][promtail-push-api] for more information. NOTE: when this endpoint is used, the incoming timestamps cannot be used and the `use_incoming_timestamp = true` setting will be ignored.
- `/ready` - accepting `GET` requests - can be used to confirm the server is reachable and healthy.
- `/api/v1/push` - internally reroutes to `/loki/api/v1/push`
- `/api/v1/raw` - internally reroutes to `/loki/api/v1/raw`
- `/loki/api/v1/raw` - accepting `POST` requests with newline-delimited log lines in body.
This can be used to send NDJSON or plain text logs.
This is compatible with the Promtail push API endpoint.
Refer to the [Promtail documentation][promtail-push-api] for more information.
When this endpoint is used, the incoming timestamps can't be used and the `use_incoming_timestamp = true` setting will be ignored.
- `/ready` - accepting `GET` requests. Can be used to confirm the server is reachable and healthy.
- `/api/v1/push` - internally reroutes to `/loki/api/v1/push`.
- `/api/v1/raw` - internally reroutes to `/loki/api/v1/raw`.


[promtail-push-api]: https://grafana.com/docs/loki/latest/clients/promtail/configuration/#loki_push_api
Expand All @@ -48,8 +52,7 @@ Name | Type | Description
`labels` | `map(string)` | The labels to associate with each received logs record. | `{}` | no
`relabel_rules` | `RelabelRules` | Relabeling rules to apply on log entries. | `{}` | no

The `relabel_rules` field can make use of the `rules` export value from a
[`loki.relabel`][loki.relabel] component to apply one or more relabeling rules to log entries before they're forwarded to the list of receivers in `forward_to`.
The `relabel_rules` field can make use of the `rules` export value from a [`loki.relabel`][loki.relabel] component to apply one or more relabeling rules to log entries before they're forwarded to the list of receivers in `forward_to`.

[loki.relabel]: ../loki.relabel/

Expand All @@ -69,7 +72,7 @@ Hierarchy | Name | Description | Requ

## Exported fields

`loki.source.api` does not export any fields.
`loki.source.api` doesn't export any fields.

## Component health

Expand All @@ -86,7 +89,9 @@ The following are some of the metrics that are exposed when this component is us

## Example

This example starts an HTTP server on `0.0.0.0` address and port `9999`. The server receives log entries and forwards them to a `loki.write` component while adding a `forwarded="true"` label. The `loki.write` component will send the logs to the specified loki instance using basic auth credentials provided.
This example starts an HTTP server on `0.0.0.0` address and port `9999`.
The server receives log entries and forwards them to a `loki.write` component while adding a `forwarded="true"` label.
The `loki.write` component will send the logs to the specified loki instance using basic auth credentials provided.

```alloy
loki.write "local" {
Expand Down
Loading

0 comments on commit 80c313d

Please sign in to comment.