diff --git a/CHANGELOG.md b/CHANGELOG.md index 2090bc33b4..e3217905f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -144,6 +144,8 @@ v1.1.0 - In `prometheus.exporter.kafka`, the interpolation table used to compute estimated lag metrics is now pruned on `metadata_refresh_interval` instead of `prune_interval_seconds`. (@wildum) +- Allow to define a custom HTTP header in all components that make HTTP requests. (@jkroepke) + - Don't restart tailers in `loki.source.kubernetes` component by above-average time deltas if K8s version is >= 1.29.1 (@hainenber) diff --git a/docs/sources/reference/components/discovery.azure.md b/docs/sources/reference/components/discovery.azure.md index d558f902f3..acb4686679 100644 --- a/docs/sources/reference/components/discovery.azure.md +++ b/docs/sources/reference/components/discovery.azure.md @@ -32,6 +32,7 @@ Name | Type | Description `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 `follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no +`host` | `string` | Override HTTP hostname. | | no `enable_http2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no {{< docs/shared lookup="reference/components/http-client-proxy-config-description.md" source="alloy" version="" >}} diff --git a/docs/sources/reference/components/discovery.consul.md b/docs/sources/reference/components/discovery.consul.md index 8244542a09..b16ec28adb 100644 --- a/docs/sources/reference/components/discovery.consul.md +++ b/docs/sources/reference/components/discovery.consul.md @@ -42,6 +42,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.digitalocean.md b/docs/sources/reference/components/discovery.digitalocean.md index 707d48081b..df8a91c937 100644 --- a/docs/sources/reference/components/discovery.digitalocean.md +++ b/docs/sources/reference/components/discovery.digitalocean.md @@ -35,6 +35,7 @@ Name | Type | Description `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 `follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no +`host` | `string` | Override HTTP hostname. | | no `enable_http2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no The DigitalOcean API uses bearer tokens for authentication, see more about it in the [DigitalOcean API documentation](https://docs.digitalocean.com/reference/api/api-reference/#section/Authentication). diff --git a/docs/sources/reference/components/discovery.docker.md b/docs/sources/reference/components/discovery.docker.md index cebdd79843..eacf32467e 100644 --- a/docs/sources/reference/components/discovery.docker.md +++ b/docs/sources/reference/components/discovery.docker.md @@ -32,6 +32,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.dockerswarm.md b/docs/sources/reference/components/discovery.dockerswarm.md index 223af0e932..ee8da1e408 100644 --- a/docs/sources/reference/components/discovery.dockerswarm.md +++ b/docs/sources/reference/components/discovery.dockerswarm.md @@ -31,6 +31,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.ec2.md b/docs/sources/reference/components/discovery.ec2.md index 9c45ada426..1e36eea4d5 100644 --- a/docs/sources/reference/components/discovery.ec2.md +++ b/docs/sources/reference/components/discovery.ec2.md @@ -35,6 +35,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.eureka.md b/docs/sources/reference/components/discovery.eureka.md index 1d7986b916..2d3b8e5744 100644 --- a/docs/sources/reference/components/discovery.eureka.md +++ b/docs/sources/reference/components/discovery.eureka.md @@ -30,6 +30,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.hetzner.md b/docs/sources/reference/components/discovery.hetzner.md index 91361f26e7..5e953f3043 100644 --- a/docs/sources/reference/components/discovery.hetzner.md +++ b/docs/sources/reference/components/discovery.hetzner.md @@ -33,6 +33,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.http.md b/docs/sources/reference/components/discovery.http.md index 19a789d4da..ee7df54425 100644 --- a/docs/sources/reference/components/discovery.http.md +++ b/docs/sources/reference/components/discovery.http.md @@ -97,6 +97,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.ionos.md b/docs/sources/reference/components/discovery.ionos.md index f939aa7e63..42526fbc0a 100644 --- a/docs/sources/reference/components/discovery.ionos.md +++ b/docs/sources/reference/components/discovery.ionos.md @@ -31,6 +31,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.kubelet.md b/docs/sources/reference/components/discovery.kubelet.md index c57c5c42b8..b9cd40da02 100644 --- a/docs/sources/reference/components/discovery.kubelet.md +++ b/docs/sources/reference/components/discovery.kubelet.md @@ -35,6 +35,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.kubernetes.md b/docs/sources/reference/components/discovery.kubernetes.md index f8c5d024b7..38433bac0d 100644 --- a/docs/sources/reference/components/discovery.kubernetes.md +++ b/docs/sources/reference/components/discovery.kubernetes.md @@ -33,6 +33,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.kuma.md b/docs/sources/reference/components/discovery.kuma.md index 9231df6797..a4c54e2b67 100644 --- a/docs/sources/reference/components/discovery.kuma.md +++ b/docs/sources/reference/components/discovery.kuma.md @@ -31,6 +31,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.lightsail.md b/docs/sources/reference/components/discovery.lightsail.md index d7f5ded47a..e52db40a03 100644 --- a/docs/sources/reference/components/discovery.lightsail.md +++ b/docs/sources/reference/components/discovery.lightsail.md @@ -33,6 +33,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.linode.md b/docs/sources/reference/components/discovery.linode.md index aaf33fd43d..5865bf8517 100644 --- a/docs/sources/reference/components/discovery.linode.md +++ b/docs/sources/reference/components/discovery.linode.md @@ -36,6 +36,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.marathon.md b/docs/sources/reference/components/discovery.marathon.md index e1d35e1273..e4fd944d59 100644 --- a/docs/sources/reference/components/discovery.marathon.md +++ b/docs/sources/reference/components/discovery.marathon.md @@ -30,6 +30,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.nomad.md b/docs/sources/reference/components/discovery.nomad.md index e6677943c0..89fbe1d699 100644 --- a/docs/sources/reference/components/discovery.nomad.md +++ b/docs/sources/reference/components/discovery.nomad.md @@ -31,6 +31,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.puppetdb.md b/docs/sources/reference/components/discovery.puppetdb.md index fe889d14f4..514d5e8291 100644 --- a/docs/sources/reference/components/discovery.puppetdb.md +++ b/docs/sources/reference/components/discovery.puppetdb.md @@ -37,6 +37,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/discovery.scaleway.md b/docs/sources/reference/components/discovery.scaleway.md index 653073203e..8db64056b7 100644 --- a/docs/sources/reference/components/discovery.scaleway.md +++ b/docs/sources/reference/components/discovery.scaleway.md @@ -44,6 +44,7 @@ Name | Type | Description `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 `follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no +`host` | `string` | Override HTTP hostname. | | no `enable_http2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no The `role` argument determines what type of Scaleway machines to discover. diff --git a/docs/sources/reference/components/discovery.uyuni.md b/docs/sources/reference/components/discovery.uyuni.md index a7767f0f7d..6c1af95d55 100644 --- a/docs/sources/reference/components/discovery.uyuni.md +++ b/docs/sources/reference/components/discovery.uyuni.md @@ -37,6 +37,7 @@ Name | Type | Description `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 `follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no +`host` | `string` | Override HTTP hostname. | | no `enable_http2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no {{< docs/shared lookup="reference/components/http-client-proxy-config-description.md" source="alloy" version="" >}} diff --git a/docs/sources/reference/components/loki.rules.kubernetes.md b/docs/sources/reference/components/loki.rules.kubernetes.md index 251ade9817..fe0f8b1e9e 100644 --- a/docs/sources/reference/components/loki.rules.kubernetes.md +++ b/docs/sources/reference/components/loki.rules.kubernetes.md @@ -38,18 +38,19 @@ loki.rules.kubernetes "LABEL" { `loki.rules.kubernetes` supports the following arguments: -Name | Type | Description | Default | Required -------------------------|------------|--------------------------------------------------------------------------------------|---------|--------- -`address` | `string` | URL of the Loki ruler. | | yes -`tenant_id` | `string` | Loki tenant ID. | | no -`use_legacy_routes` | `bool` | Whether to use deprecated ruler API endpoints. | false | no -`sync_interval` | `duration` | Amount of time between reconciliations with Loki. | "30s" | no +Name | Type | Description | Default | Required +------------------------|------------|---------------------------------------------------------------------------------|---------|--------- +`address` | `string` | URL of the Loki ruler. | | yes +`tenant_id` | `string` | Loki tenant ID. | | no +`use_legacy_routes` | `bool` | Whether to use deprecated ruler API endpoints. | false | no +`sync_interval` | `duration` | Amount of time between reconciliations with Loki. | "30s" | no `loki_namespace_prefix` | `string` | Prefix used to differentiate multiple {{< param "PRODUCT_NAME" >}} deployments. | "alloy" | no -`bearer_token` | `secret` | Bearer token to authenticate with. | | no -`bearer_token_file` | `string` | File containing a bearer token to authenticate with. | | no -`proxy_url` | `string` | HTTP proxy to proxy requests through. | | 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 +`bearer_token` | `secret` | Bearer token to authenticate with. | | no +`bearer_token_file` | `string` | File containing a bearer token to authenticate with. | | no +`proxy_url` | `string` | HTTP proxy to proxy requests through. | | no +`follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no +`host` | `string` | Override HTTP hostname. | | no +`enable_http2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no At most, one of the following can be provided: - [`bearer_token` argument](#arguments). diff --git a/docs/sources/reference/components/loki.source.kubernetes.md b/docs/sources/reference/components/loki.source.kubernetes.md index fd555b13f8..93a2a974d4 100644 --- a/docs/sources/reference/components/loki.source.kubernetes.md +++ b/docs/sources/reference/components/loki.source.kubernetes.md @@ -98,6 +98,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/loki.source.kubernetes_events.md b/docs/sources/reference/components/loki.source.kubernetes_events.md index c8e61a13e6..cf5e1caedc 100644 --- a/docs/sources/reference/components/loki.source.kubernetes_events.md +++ b/docs/sources/reference/components/loki.source.kubernetes_events.md @@ -100,6 +100,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/loki.source.podlogs.md b/docs/sources/reference/components/loki.source.podlogs.md index 41994eb28e..e97179d398 100644 --- a/docs/sources/reference/components/loki.source.podlogs.md +++ b/docs/sources/reference/components/loki.source.podlogs.md @@ -151,6 +151,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/loki.write.md b/docs/sources/reference/components/loki.write.md index cb864993ee..037542791b 100644 --- a/docs/sources/reference/components/loki.write.md +++ b/docs/sources/reference/components/loki.write.md @@ -80,6 +80,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/mimir.rules.kubernetes.md b/docs/sources/reference/components/mimir.rules.kubernetes.md index 852c92e6a5..ffd9ff4f5b 100644 --- a/docs/sources/reference/components/mimir.rules.kubernetes.md +++ b/docs/sources/reference/components/mimir.rules.kubernetes.md @@ -59,6 +59,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/prometheus.operator.podmonitors.md b/docs/sources/reference/components/prometheus.operator.podmonitors.md index a5621b5086..c30ed0c32b 100644 --- a/docs/sources/reference/components/prometheus.operator.podmonitors.md +++ b/docs/sources/reference/components/prometheus.operator.podmonitors.md @@ -81,6 +81,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/prometheus.operator.probes.md b/docs/sources/reference/components/prometheus.operator.probes.md index c4b0dc8a30..896a036f52 100644 --- a/docs/sources/reference/components/prometheus.operator.probes.md +++ b/docs/sources/reference/components/prometheus.operator.probes.md @@ -83,6 +83,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/prometheus.operator.servicemonitors.md b/docs/sources/reference/components/prometheus.operator.servicemonitors.md index fab8c5c29b..b6c37475f5 100644 --- a/docs/sources/reference/components/prometheus.operator.servicemonitors.md +++ b/docs/sources/reference/components/prometheus.operator.servicemonitors.md @@ -82,6 +82,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/prometheus.remote_write.md b/docs/sources/reference/components/prometheus.remote_write.md index c865d31477..c74703825c 100644 --- a/docs/sources/reference/components/prometheus.remote_write.md +++ b/docs/sources/reference/components/prometheus.remote_write.md @@ -94,6 +94,7 @@ Name | Type | Description | Default | Required `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/prometheus.scrape.md b/docs/sources/reference/components/prometheus.scrape.md index be93c1aec8..a1353bf7ad 100644 --- a/docs/sources/reference/components/prometheus.scrape.md +++ b/docs/sources/reference/components/prometheus.scrape.md @@ -63,6 +63,7 @@ The following arguments are supported: | `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 | +| `host` | `string` | Override HTTP hostname. | | 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 | diff --git a/docs/sources/reference/components/pyroscope.scrape.md b/docs/sources/reference/components/pyroscope.scrape.md index a03e567496..2e18ce06b0 100644 --- a/docs/sources/reference/components/pyroscope.scrape.md +++ b/docs/sources/reference/components/pyroscope.scrape.md @@ -66,6 +66,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/pyroscope.write.md b/docs/sources/reference/components/pyroscope.write.md index 4858606386..456c67bf1c 100644 --- a/docs/sources/reference/components/pyroscope.write.md +++ b/docs/sources/reference/components/pyroscope.write.md @@ -73,6 +73,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/docs/sources/reference/components/remote.kubernetes.configmap.md b/docs/sources/reference/components/remote.kubernetes.configmap.md index 0fd490b88c..cce24cf5b4 100644 --- a/docs/sources/reference/components/remote.kubernetes.configmap.md +++ b/docs/sources/reference/components/remote.kubernetes.configmap.md @@ -72,13 +72,14 @@ The following arguments are supported: Name | Type | Description | Default | Required -------------------------|---------------------|---------------------------------------------------------------|---------|--------- `api_server` | `string` | URL of the Kubernetes API server. | | no -`kubeconfig_file` | `string` | Path of the `kubeconfig` file to use for connecting to Kubernetes. | | no +`kubeconfig_file` | `string` | Path of the `kubeconfig` file to use for connecting to Kubernetes. | | 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 +`host` | `string` | Override HTTP hostname. | | 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 +`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 diff --git a/docs/sources/reference/components/remote.kubernetes.secret.md b/docs/sources/reference/components/remote.kubernetes.secret.md index 49fd2296bd..6528eb78da 100644 --- a/docs/sources/reference/components/remote.kubernetes.secret.md +++ b/docs/sources/reference/components/remote.kubernetes.secret.md @@ -69,18 +69,19 @@ If the `client` block isn't provided, the default in-cluster configuration with The following arguments are supported: -Name | Type | Description | Default | Required --------------------------|---------------------|---------------------------------------------------------------|---------|--------- -`api_server` | `string` | URL of the Kubernetes API server. | | no -`kubeconfig_file` | `string` | Path of the `kubeconfig` file to use for connecting to Kubernetes. | | 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 +-------------------------|---------------------|--------------------------------------------------------------------------------------------------|---------|--------- +`api_server` | `string` | URL of the Kubernetes API server. | | no +`kubeconfig_file` | `string` | Path of the `kubeconfig` file to use for connecting to Kubernetes. | | 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 +`host` | `string` | Override HTTP hostname. | | 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][client]. diff --git a/docs/sources/shared/reference/components/http-client-config-block.md b/docs/sources/shared/reference/components/http-client-config-block.md index 8a41b288d1..0e656abbaf 100644 --- a/docs/sources/shared/reference/components/http-client-config-block.md +++ b/docs/sources/shared/reference/components/http-client-config-block.md @@ -10,6 +10,7 @@ Name | Type | Description `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 +`host` | `string` | Override HTTP hostname. | | 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 diff --git a/internal/component/common/config/types.go b/internal/component/common/config/types.go index 2cedf45372..7aae3fa685 100644 --- a/internal/component/common/config/types.go +++ b/internal/component/common/config/types.go @@ -24,6 +24,7 @@ type HTTPClientConfig struct { TLSConfig TLSConfig `alloy:"tls_config,block,optional"` FollowRedirects bool `alloy:"follow_redirects,attr,optional"` EnableHTTP2 bool `alloy:"enable_http2,attr,optional"` + Host string `alloy:"host,attr,optional"` } // SetToDefault implements the syntax.Defaulter @@ -92,6 +93,7 @@ func (h *HTTPClientConfig) Convert() *config.HTTPClientConfig { FollowRedirects: h.FollowRedirects, EnableHTTP2: h.EnableHTTP2, ProxyConfig: h.ProxyConfig.Convert(), + Host: h.Host, } } diff --git a/internal/component/common/config/types_test.go b/internal/component/common/config/types_test.go index cb364f4d0b..24918cb0e4 100644 --- a/internal/component/common/config/types_test.go +++ b/internal/component/common/config/types_test.go @@ -42,6 +42,18 @@ func TestHTTPClientConfigBearerTokenFile(t *testing.T) { require.NoError(t, err) } +func TestHTTPClientConfigHost(t *testing.T) { + var exampleAlloyConfig = ` + host = localhost + follow_redirects = true + enable_http2 = true +` + + var httpClientConfig HTTPClientConfig + err := syntax.Unmarshal([]byte(exampleAlloyConfig), &httpClientConfig) + require.NoError(t, err) +} + func TestHTTPClientConfigBasicAuthPassword(t *testing.T) { var exampleAlloyConfig = ` proxy_url = "http://0.0.0.0:11111" diff --git a/internal/component/discovery/azure/azure.go b/internal/component/discovery/azure/azure.go index 11b445c3cb..561e595a51 100644 --- a/internal/component/discovery/azure/azure.go +++ b/internal/component/discovery/azure/azure.go @@ -40,6 +40,7 @@ type Arguments struct { ProxyConfig *config.ProxyConfig `alloy:",squash"` FollowRedirects bool `alloy:"follow_redirects,attr,optional"` + Host string `alloy:"host,attr,optional"` EnableHTTP2 bool `alloy:"enable_http2,attr,optional"` TLSConfig config.TLSConfig `alloy:"tls_config,block,optional"` } @@ -102,6 +103,7 @@ func (a Arguments) Convert() discovery.DiscovererConfig { httpClientConfig.EnableHTTP2 = a.EnableHTTP2 httpClientConfig.TLSConfig = a.TLSConfig httpClientConfig.ProxyConfig = a.ProxyConfig + httpClientConfig.Host = a.Host return &prom_discovery.SDConfig{ Environment: a.Environment, diff --git a/internal/component/discovery/digitalocean/digitalocean.go b/internal/component/discovery/digitalocean/digitalocean.go index 7b06107abb..02066414f4 100644 --- a/internal/component/discovery/digitalocean/digitalocean.go +++ b/internal/component/discovery/digitalocean/digitalocean.go @@ -36,6 +36,7 @@ type Arguments struct { ProxyConfig *config.ProxyConfig `alloy:",squash"` FollowRedirects bool `alloy:"follow_redirects,attr,optional"` + Host string `alloy:"host,attr,optional"` EnableHTTP2 bool `alloy:"enable_http2,attr,optional"` } @@ -73,6 +74,7 @@ func (a Arguments) Convert() discovery.DiscovererConfig { httpClientConfig.FollowRedirects = a.FollowRedirects httpClientConfig.EnableHTTP2 = a.EnableHTTP2 httpClientConfig.ProxyConfig = a.ProxyConfig + httpClientConfig.Host = a.Host return &prom_discovery.SDConfig{ RefreshInterval: model.Duration(a.RefreshInterval), diff --git a/internal/component/discovery/scaleway/scaleway.go b/internal/component/discovery/scaleway/scaleway.go index a5b34117db..a8db8d0393 100644 --- a/internal/component/discovery/scaleway/scaleway.go +++ b/internal/component/discovery/scaleway/scaleway.go @@ -49,6 +49,7 @@ type Arguments struct { TLSConfig config.TLSConfig `alloy:"tls_config,block,optional"` FollowRedirects bool `alloy:"follow_redirects,attr,optional"` EnableHTTP2 bool `alloy:"enable_http2,attr,optional"` + Host string `alloy:"host,attr,optional"` } var DefaultArguments = Arguments{ @@ -124,6 +125,7 @@ func (args Arguments) Convert() discovery.DiscovererConfig { TLSConfig: *args.TLSConfig.Convert(), FollowRedirects: args.FollowRedirects, EnableHTTP2: args.EnableHTTP2, + Host: args.Host, }, RefreshInterval: model.Duration(args.RefreshInterval), diff --git a/internal/component/discovery/uyuni/uyuni.go b/internal/component/discovery/uyuni/uyuni.go index d5516c6565..7a3b5c3bf8 100644 --- a/internal/component/discovery/uyuni/uyuni.go +++ b/internal/component/discovery/uyuni/uyuni.go @@ -40,6 +40,7 @@ type Arguments struct { TLSConfig config.TLSConfig `alloy:"tls_config,block,optional"` FollowRedirects bool `alloy:"follow_redirects,attr,optional"` EnableHTTP2 bool `alloy:"enable_http2,attr,optional"` + Host string `alloy:"host,attr,optional"` } var DefaultArguments = Arguments{ @@ -84,6 +85,7 @@ func (a Arguments) Convert() discovery.DiscovererConfig { TLSConfig: *a.TLSConfig.Convert(), FollowRedirects: a.FollowRedirects, EnableHTTP2: a.EnableHTTP2, + Host: a.Host, }, } }