Prometheus Remote Write Source
The Vector prometheus_remote_write
source
receives metrics from Prometheus.
Configuration
- Common
- Advanced
- vector.toml
- vector.yaml
- vector.json
[sources.my_source_id]type = "prometheus_remote_write" # requiredaddress = "0.0.0.0:9090" # required
- commonrequiredstring
address
The address to accept connections on. The address must include a port.
- Syntax:
literal
- View examples
- Syntax:
- optionaltable
auth
Options for HTTP Basic Authentication.
- commonrequiredstring
password
The basic authentication password.
- Syntax:
literal
- View examples
- Syntax:
- commonrequiredstring
username
The basic authentication user name.
- Syntax:
literal
- View examples
- Syntax:
- optionaltable
tls
Configures the TLS options for incoming connections.
- optionalstring
ca_file
Absolute path to an additional CA certificate file, in DER or PEM format (X.509), or an in-line CA certificate in PEM format.
- Syntax:
literal
- View examples
- Syntax:
- optionalstring
crt_file
Absolute path to a certificate file used to identify this server, in DER or PEM format (X.509) or PKCS#12, or an in-line certificate in PEM format. If this is set, and is not a PKCS#12 archive,
key_file
must also be set. This is required ifenabled
is set totrue
.- Syntax:
literal
- View examples
- Syntax:
- optionalbool
enabled
Require TLS for incoming connections. If this is set, an identity certificate is also required.
- Default:
false
- View examples
- Default:
- optionalstring
key_file
Absolute path to a private key file used to identify this server, in DER or PEM format (PKCS#8), or an in-line private key in PEM format.
- Syntax:
literal
- View examples
- Syntax:
- optionalstring
key_pass
Pass phrase used to unlock the encrypted key file. This has no effect unless
key_file
is set.- Syntax:
literal
- View examples
- Syntax:
- optionalbool
verify_certificate
If
true
, Vector will require a TLS certificate from the connecting host and terminate the connection if the certificate is not valid. Iffalse
(the default), Vector will not request a certificate from the client.- Default:
false
- View examples
- Default:
Output
This component outputs the following metric events:
- counter
counter
A single value that can only be incremented or reset to zero value, it cannot be decremented. This metric includes the following tags:
*
- Any tags present on the metric.
- gauge
gauge
A gauge represents a point-in-time value that can increase and decrease. Vector's internal gauge type represents changes to that value. Gauges should be used to track fluctuations in values, like current memory or CPU usage. This metric includes the following tags:
*
- Any tags present on the metric.
Telemetry
This component provides the following metrics that can be retrieved through
the internal_metrics
source. See the
metrics section in the
monitoring page for more info.
- counter
http_error_response_total
The total number of HTTP error responses for this component. This metric includes the following tags:
instance
- The Vector instance identified by host and port.job
- The name of the job producing Vector metrics.
- counter
http_request_errors_total
The total number of HTTP request errors for this component. This metric includes the following tags:
instance
- The Vector instance identified by host and port.job
- The name of the job producing Vector metrics.
- counter
parse_errors_total
The total number of errors parsing metrics for this component. This metric includes the following tags:
instance
- The Vector instance identified by host and port.job
- The name of the job producing Vector metrics.
- counter
processed_bytes_total
The total number of bytes processed by the component. This metric includes the following tags:
component_kind
- The Vector component kind.component_name
- The Vector component ID.component_type
- The Vector component type.instance
- The Vector instance identified by host and port.job
- The name of the job producing Vector metrics.
- counter
processed_events_total
The total number of events processed by this component. This metric includes the following tags:
component_kind
- The Vector component kind.component_name
- The Vector component ID.component_type
- The Vector component type.file
- The file that produced the errorinstance
- The Vector instance identified by host and port.job
- The name of the job producing Vector metrics.
- counter
requests_completed_total
The total number of requests completed by this component. This metric includes the following tags:
component_kind
- The Vector component kind.component_name
- The Vector component ID.component_type
- The Vector component type.instance
- The Vector instance identified by host and port.job
- The name of the job producing Vector metrics.
- counter
requests_received_total
The total number of requests received by this component. This metric includes the following tags:
component_kind
- The Vector component kind.component_name
- The Vector component ID.component_type
- The Vector component type.instance
- The Vector instance identified by host and port.job
- The name of the job producing Vector metrics.
- counter
events_out_total
The total number of events emitted by this component. This metric includes the following tags:
component_kind
- The Vector component kind.component_name
- The Vector component ID.component_type
- The Vector component type.instance
- The Vector instance identified by host and port.job
- The name of the job producing Vector metrics.
- histogram
request_duration_nanoseconds
The total request duration in nanoseconds. This metric includes the following tags:
instance
- The Vector instance identified by host and port.job
- The name of the job producing Vector metrics.
How It Works
Context
By default, the prometheus_remote_write
source will augment events with helpful
context keys as shown in the "Output" section.
Metric type interpretation
The remote_write protocol used by this source transmits only the metric tags, timestamp, and numerical value. No explicit information about the original type of the metric (i.e. counter, histogram, etc) is included. As such, this source makes a guess as to what the original metric type was.
For metrics named with a suffix of _total
, this source
emits the value as a counter metric. All other metrics
are emitted as gauges.
State
This component is stateless, meaning its behavior is consistent across each input.
Transport Layer Security (TLS)
Vector uses Openssl for TLS protocols. You can
adjust TLS behavior via the tls.*
options.