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

Add missing documentation for scheduled_task in Static docs #5520

Closed
wants to merge 2 commits into from
Closed
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
77 changes: 40 additions & 37 deletions docs/sources/flow/reference/components/discovery.azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,38 +36,41 @@ Name | Type | Description
`enable_http2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no

## Blocks

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
tls_config | [tls_config][] | TLS configuration for requests to the Azure API. | no
Hierarchy | Block | Description | Required
-----------------|----------------------|--------------------------------------------------|---------
oauth | [oauth][] | OAuth configuration for Azure API. | no
managed_identity | [managed_identity][] | Managed Identity 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
### oauth

The `oauth` block configures OAuth 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 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
Name | Type | Description | Default | Required
------------|----------|-----------------------------|---------|---------
`client_id` | `string` | Managed Identity client ID. | | yes

### tls_config block
### tls_config

{{< docs/shared lookup="flow/reference/components/tls-config-block.md" source="agent" version="<AGENT VERSION>" >}}

Expand All @@ -76,7 +79,7 @@ Name | Type | Description | Default | Required
The following fields are exported and can be referenced by other components:

Name | Type | Description
--------- | ------------------- | -----------
----------|---------------------|--------------------------------------------------
`targets` | `list(map(string))` | The set of targets discovered from the Azure API.

Each target includes the following labels:
Expand All @@ -91,36 +94,35 @@ Each target includes the following labels:
* `__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_tag_*`: A tag on the VM. There must be one label per tag.
* `__meta_azure_machine_scale_set`: The name of the scale set the VM is in.
* `__meta_azure_machine_size`: The size of the VM.

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.

## Component health

`discovery.azure` is only reported as unhealthy when given an invalid
configuration. In those cases, exported fields retain their last healthy
values.
`discovery.azure` is only reported as unhealthy when given an invalid configuration.
In those cases, exported fields retain their last healthy values.

## Debug information

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

## Debug metrics

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

## Example

```river
discovery.azure "example" {
port = 80
subscription_id = AZURE_SUBSCRIPTION_ID
subscription_id = <AZURE_SUBSCRIPTION_ID>
oauth {
client_id = AZURE_CLIENT_ID
client_secret = AZURE_CLIENT_SECRET
tenant_id = AZURE_TENANT_ID
client_id = <AZURE_CLIENT_ID>
client_secret = <AZURE_CLIENT_SECRET>
tenant_id = <AZURE_TENANT_ID>
}
}

Expand All @@ -131,20 +133,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:
- `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.
75 changes: 37 additions & 38 deletions docs/sources/flow/reference/components/discovery.consul.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: Learn about 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

Expand Down Expand Up @@ -50,7 +50,7 @@ Name | Type | Description | Default | Required

At most one of the following can be provided:
- [`bearer_token` argument](#arguments).
- [`bearer_token_file` argument](#arguments).
- [`bearer_token_file` argument](#arguments).
- [`basic_auth` block][basic_auth].
- [`authorization` block][authorization].
- [`oauth2` block][oauth2].
Expand All @@ -63,12 +63,12 @@ Name | Type | Description | Default | Required
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
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

The `>` symbol indicates deeper levels of nesting. For example,
`oauth2 > tls_config` refers to a `tls_config` block defined inside
Expand All @@ -79,59 +79,58 @@ an `oauth2` block.
[oauth2]: #oauth2-block
[tls_config]: #tls_config-block

### basic_auth block
### basic_auth

{{< docs/shared lookup="flow/reference/components/basic-auth-block.md" source="agent" version="<AGENT VERSION>" >}}

### authorization block
### authorization

{{< docs/shared lookup="flow/reference/components/authorization-block.md" source="agent" version="<AGENT VERSION>" >}}

### oauth2 block
### oauth2

{{< docs/shared lookup="flow/reference/components/oauth2-block.md" source="agent" version="<AGENT VERSION>" >}}

### tls_config block
### tls_config

{{< docs/shared lookup="flow/reference/components/tls-config-block.md" source="agent" version="<AGENT VERSION>" >}}

## Exported fields

The following fields are exported and can be referenced by other components:

Name | Type | Description
---- | ---- | -----------
Name | Type | Description
----------|---------------------|-----------------------------------------------------------
`targets` | `list(map(string))` | The set of targets discovered from the Consul catalog API.

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

## Component health

`discovery.consul` is only reported as unhealthy when given an invalid
configuration. In those cases, exported fields retain their last healthy
values.
`discovery.consul` is only reported as unhealthy when given an invalid configuration.
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 All @@ -153,16 +152,16 @@ 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.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ description: Shared content, authorization block
headless: true
---

Name | Type | Description | Default | Required
---- | ---- | ----------- | ------- | --------
`type` | `string` | Authorization type, for example, "Bearer". | | no
`credentials` | `secret` | Secret value. | | no
`credentials_file` | `string` | File containing the secret value. | | no
Name | Type | Description | Default | Required
-------------------|----------|--------------------------------------------|---------|---------
`type` | `string` | Authorization type, for example, "Bearer". | | no
`credentials` | `secret` | Secret value. | | no
`credentials_file` | `string` | File containing the secret value. | | no

`credential` and `credentials_file` are mutually exclusive and only one can be
provided inside of an `authorization` block.
`credential` and `credentials_file` are mutually exclusive and only one can be provided inside of an `authorization` block.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ description: Shared content, azuread block
headless: true
---

Name | Type | Description | Default | Required
---- | ---- | ----------- | ------- | --------
Name | Type | Description | Default | Required
--------|----------|------------------|-----------------|---------
`cloud` | `string` | The Azure Cloud. | `"AzurePublic"` | no

The supported values for `cloud` are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ description: Shared content, basic auth block
headless: true
---

Name | Type | Description | Default | Required
---- | ---- | ----------- | ------- | --------
`username` | `string` | Basic auth username. | | no
`password` | `secret` | Basic auth password. | | no
`password_file` | `string` | File containing the basic auth password. | | no
Name | Type | Description | Default | Required
----------------|----------|------------------------------------------|---------|---------
`username` | `string` | Basic auth username. | | no
`password` | `secret` | Basic auth password. | | no
`password_file` | `string` | File containing the basic auth password. | | no

`password` and `password_file` are mutually exclusive and only one can be
provided inside of a `basic_auth` block.
`password` and `password_file` are mutually exclusive and only one can be provided inside of a `basic_auth` block.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ headless: true
The following fields are exported and can be referenced by other components.

Name | Type | Description
--------- | ------------------- | -----------
----------|---------------------|----------------------------------------------------------
`targets` | `list(map(string))` | The targets that can be used to collect exporter metrics.

For example, the `targets` can either be passed to a `discovery.relabel`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@ headless: true

The following attributes are supported:

Name | Type | Description | Default | Required
---- |----------------|----------------------------------------------------------------------------------------------------------|---------| --------
`tag_name` | `string` | The name of the resource attribute that will be added to logs, metrics, or spans. | `""` | no
`key` | `string` | The annotation (or label) name. This must exactly match an annotation (or label) name. | `""` | no
`key_regex` | `string` | A regular expression used to extract a key that matches the regex. | `""` | no
`regex` | `string` | An optional field used to extract a sub-string from a complex field value. | `""` | no
`from` | `string` | The source of the labels or annotations. Allowed values are `pod` and `namespace`. | `pod` | no
Name | Type | Description | Default | Required
------------|----------|------------------------------------------------------------------------------------|---------|---------
`tag_name` | `string` | The name of the resource attribute added to logs, metrics, or spans. | `""` | no
`key` | `string` | The annotation or label name. This must exactly match an annotation or label name. | `""` | no
`key_regex` | `string` | A regular expression used to extract a key that matches the regular expression. | `""` | no
`regex` | `string` | An optional field used to extract a sub-string from a complex field value. | `""` | no
`from` | `string` | The source of the labels or annotations. Allowed values are `pod` and `namespace`. | `pod` | no

When `tag_name` is not specified, a default tag name will be used with the format:
* `k8s.pod.annotations.<annotation key>`
* `k8s.pod.labels.<label key>`

For example, if `tag_name` is not specified and the key is `git_sha`, then the attribute name will be
`k8s.pod.annotations.git_sha`.
For example, if you don't specify the `tag_name` and the key is `git_sha`, then the attribute name is `k8s.pod.annotations.git_sha`.

Either the `key` attribute or the `key_regex` attribute should be set, not both.
When `key_regex` is present, `tag_name` supports back reference to both
Expand All @@ -34,7 +33,7 @@ For example, assume your pod spec contains the following labels:
* `app.kubernetes.io/component: mysql`
* `app.kubernetes.io/version: 5.7.21`

If you'd like to add tags for all labels with prefix `app.kubernetes.io/` and trim the prefix,
If you'd like to add tags for all labels with prefix `app.kubernetes.io/` and trim the prefix,
then you can specify the following extraction rules:

```river
Expand All @@ -47,6 +46,6 @@ extract {
}
```

These rules will add the `component` and `version` tags to the spans or metrics.
These rules add the `component` and `version` tags to the spans or metrics.

The `from` attribute can be set to either `"pod"` or `"namespace"`.
You can set the `from` attribute to either `"pod"` or `"namespace"`.
Loading