Prometheus Remote Write
High cardinality metric names and labels are discouraged by
Prometheus as they can provide performance and reliability
problems. You should consider alternative strategies to reduce
the cardinality. Vector offers a tag_cardinality_limit
transform
as a way to protect against this.
Configuration Options
Required Options
endpoint(required)
The endpoint URL to send data to.
Type | Syntax | Default | Example |
---|---|---|---|
string | literal | ["https://localhost:8087/"] |
inputs(required)
A list of upstream source or transform
IDs. Wildcards (*
) are supported.
See configuration for more info.
Type | Syntax | Default | Example |
---|---|---|---|
array | literal | ["my-source-or-transform-id","prefix-*"] |
type(required)
The component type. This is a required field for all components and tells Vector which component to use.
Type | Syntax | Default | Example |
---|---|---|---|
string | literal | ["prometheus_remote_write"] |
Advanced Options
auth(optional)
Configures the authentication strategy.
Type | Syntax | Default | Example |
---|---|---|---|
hash | literal | [] |
default_namespace(optional)
Used as a namespace for metrics that don't have it. A namespace will be prefixed to a metric's name. It should follow Prometheus naming conventions.
Type | Syntax | Default | Example |
---|---|---|---|
string | literal | ["service"] |
buckets(optional)
Default buckets to use for aggregating distribution metrics into histograms.
Type | Syntax | Default | Example |
---|---|---|---|
array | 0.0050.010.0250.050.10.250.512.5510 | [0.005,0.01] |
quantiles(optional)
Quantiles to use for aggregating distribution metrics into a summary.
Type | Syntax | Default | Example |
---|---|---|---|
array | 0.50.750.90.950.99 | [0.5,0.75,0.9,0.95,0.99] |
batch(optional)
Configures the sink batching behavior.
Type | Syntax | Default | Example |
---|---|---|---|
hash | [] |
healthcheck(optional)
Health check options for the sink.
Type | Syntax | Default | Example |
---|---|---|---|
hash | [] |
request(optional)
Configures the sink request behavior.
Type | Syntax | Default | Example |
---|---|---|---|
hash | [] |
tls(optional)
Configures the TLS options for incoming connections.
Type | Syntax | Default | Example |
---|---|---|---|
hash | literal | [] |
proxy(optional)
Configures an HTTP(S) proxy for Vector to use. By default, the globally configured proxy is used.
Type | Syntax | Default | Example |
---|---|---|---|
hash | literal | [] |
tenant_id(optional)
If set, a header named X-Scope-OrgID
will be added to outgoing requests with the text of this setting. This may be used by Cortex or other remote services to identify the tenant making the request.
Type | Syntax | Default | Example |
---|---|---|---|
string | template | ["my-domain"] |
How it Works
State
This component is stateless, meaning its behavior is consistent across each input.
Health checks
Health checks ensure that the downstream service is accessible and ready to accept data. This check is performed upon sink initialization. If the health check fails an error will be logged and Vector will proceed to start.
Partitioning
Vector supports dynamic configuration values through a simple template syntax. If an option supports templating, it will be noted with a badge and you can use event fields to create dynamic values. For example:
[sinks.my-sink]
dynamic_option = "application={{ application_id }}"
In the above example, the application_id
for each event will be
used to partition outgoing data.
Rate limits & adapative concurrency
Transport Layer Security (TLS)
Retry policy
Vector will retry failed requests (status == 429, >= 500, and != 501).
Other responses will not be retried. You can control the number of
retry attempts and backoff rate with the request.retry_attempts
and
request.retry_backoff_secs
options.