AWS Cloudwatch Metrics
Gauge values are persisted between flushes. On Vector start up each gauge is assumed to have zero, 0.0, value, that can be updated explicitly by the consequent absolute, not delta, gauge observation, or by delta increments/decrements. Delta gauges are considered an advanced feature useful in a distributed setting, however they should be used with care.
CloudWatch Metrics types are organized not by their semantics, but by storage properties:
- Statistic Sets
- Data Points
In Vector only the latter is used to allow lossless statistics calculations on CloudWatch side.
Configuration Options
Required Options
default_namespace(required)
A namespace that will isolate different metrics from each other. Used as a namespace for metrics that don't have it.
Type | Syntax | Default | Example |
---|---|---|---|
string | literal | ["service"] |
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-*"] |
region(required)
The AWS region of the target service. If endpoint
is provided it will override this value since the endpoint includes the region.
Type | Syntax | Default | Example |
---|---|---|---|
string | literal | ["us-east-1"] |
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 | ["aws_cloudwatch_metrics"] |
Advanced Options
auth(optional)
Options for the authentication strategy.
Type | Syntax | Default | Example |
---|---|---|---|
hash | literal | [] |
endpoint(optional)
Custom endpoint for use with AWS-compatible services. Providing a value for this option will make region
moot.
Type | Syntax | Default | Example |
---|---|---|---|
string | literal | ["127.0.0.0:5000/path/to/service"] |
batch(optional)
Configures the sink batching behavior.
Type | Syntax | Default | Example |
---|---|---|---|
hash | [] |
compression(optional)
The compression strategy used to compress the encoded event data before transmission.
Some cloud storage API clients and browsers will handle decompression transparently, so files may not always appear to be compressed depending how they are accessed.
Type | Syntax | Default | Example |
---|---|---|---|
string | literal | none |
healthcheck(optional)
Health check options for the sink.
Type | Syntax | Default | Example |
---|---|---|---|
hash | [] |
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 | [] |
How it Works
AWS authentication
Vector checks for AWS credentials in the following order:
- The
access_key_id
andsecret_access_key
options. - The
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
environment variables. - The
credential_process
command in the AWS config file (usually located at~/.aws/config
). - The AWS credentials file (usually located at
~/.aws/credentials
). - The IAM instance profile (only works if running on an EC2 instance with an instance profile/role).
If no credentials are found, Vector's health check fails and an error is logged. If your AWS credentials expire, Vector will automatically search for up-to-date credentials in the places (and order) described above.
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.