AWS Cloudwatch Metrics

CAUTION

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.

TIP

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.

TypeSyntaxDefaultExample
stringliteral["service"]
inputs(required)

A list of upstream source or transform IDs. Wildcards (*) are supported.

See configuration for more info.

TypeSyntaxDefaultExample
arrayliteral["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.

TypeSyntaxDefaultExample
stringliteral["us-east-1"]
type(required)

The component type. This is a required field for all components and tells Vector which component to use.

TypeSyntaxDefaultExample
stringliteral["aws_cloudwatch_metrics"]

Advanced Options

auth(optional)

Options for the authentication strategy.

TypeSyntaxDefaultExample
hashliteral[]
endpoint(optional)

Custom endpoint for use with AWS-compatible services. Providing a value for this option will make region moot.

TypeSyntaxDefaultExample
stringliteral["127.0.0.0:5000/path/to/service"]
batch(optional)

Configures the sink batching behavior.

TypeSyntaxDefaultExample
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.

TypeSyntaxDefaultExample
stringliteralnone
healthcheck(optional)

Health check options for the sink.

TypeSyntaxDefaultExample
hash[]
proxy(optional)

Configures an HTTP(S) proxy for Vector to use. By default, the globally configured proxy is used.

TypeSyntaxDefaultExample
hashliteral[]

How it Works

AWS authentication

Vector checks for AWS credentials in the following order:

  1. The access_key_id and secret_access_key options.
  2. The AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.
  3. The credential_process command in the AWS config file (usually located at ~/.aws/config).
  4. The AWS credentials file (usually located at ~/.aws/credentials).
  5. 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.