Prometheus Scrape Source
The Vector prometheus_scrape
source
collects metrics from Prometheus
client.
Configuration
- Common
- Advanced
- vector.toml
- vector.yaml
- vector.json
[sources.my_source_id]type = "prometheus_scrape" # requiredendpoints = ["http://localhost:9090/metrics"] # requiredscrape_interval_secs = 15 # optional, default, seconds
- optionaltable
auth
Configures the authentication strategy.
- commonrequiredstring
password
The basic authentication password.
- Syntax:
literal
- View examples
- Syntax:
- enumcommonrequiredstring
strategy
The authentication strategy to use.
- Syntax:
literal
- Enum, must be one of:
"basic"
"bearer"
- View examples
- Syntax:
- commonrequiredstring
token
The token to use for bearer authentication
- Syntax:
literal
- View examples
- Syntax:
- commonrequiredstring
user
The basic authentication user name.
- Syntax:
literal
- View examples
- Syntax:
- commonrequired[string]
endpoints
Endpoints to scrape metrics from.
- WARNING: You must explicitly add the path to your endpoints. Vector will _not_ automatically add `/metics`.
- View examples
- commonoptionaluint
scrape_interval_secs
The interval between scrapes, in seconds.
- Default:
15
(seconds)
- Default:
- 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 inline CA certificate in PEM format.
- Syntax:
literal
- View examples
- Syntax:
- commonoptionalstring
crt_file
Absolute path to a certificate file used to identify this connection, in DER or PEM format (X.509) or PKCS#12, or an inline certificate in PEM format. If this is set and is not a PKCS#12 archive,
key_file
must also be set.- Syntax:
literal
- View examples
- Syntax:
- commonoptionalstring
key_file
Absolute path to a private key file used to identify this connection, in DER or PEM format (PKCS#8), or an inline private key in PEM format. If this is set,
crt_file
must also be set.- 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_hostname
If
true
(the default), Vector will validate the configured remote host name against the remote host's TLS certificate. Do NOT set this tofalse
unless you understand the risks of not verifying the remote hostname.- Default:
true
- 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.
- gauge
histogram
Also called a "timer". A histogram samples observations (usually things like request durations or response sizes) and counts them in configurable buckets. It also provides a sum of all observed values. This metric includes the following tags:
*
- Any tags present on the metric.
- gauge
summary
Similar to a histogram, a summary samples observations (usually things like request durations and response sizes). While it also provides a total count of observations and a sum of all observed values, it calculates configurable quantiles over a sliding time window. 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
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.
How It Works
Context
By default, the prometheus_scrape
source will augment events with helpful
context keys as shown in the "Output" section.
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.