AWS Cloudwatch Metrics Sink

The Vector aws_cloudwatch_metrics sink streams metric events to Amazon Web Service's CloudWatch Metrics service via the PutMetricData API endpoint.

Configuration

  • Common
  • Advanced
vector.toml
[sinks.my_sink_id]
type = "aws_cloudwatch_metrics" # example, must be: "aws_cloudwatch_metrics"
inputs = ["my-source-id"] # example
namespace = "service" # example
region = "us-east-1" # example

Options

3 items
booloptional

healthcheck

Enables/disables the sink healthcheck upon start. See Health Checks for more info.

Default: true
View examples
commonstringrequired

namespace

A namespace that will isolate different metrics from each other.

No default
View examples
commonstringrequired

region

The AWS region of the target CloudWatch stream resides.

No default
View examples

How It Works

Environment Variables

Environment variables are supported through all of Vector's configuration. Simply add ${MY_ENV_VAR} in your Vector configuration file and the variable will be replaced before being evaluated.

You can learn more in the Environment Variables section.

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.

Require Health Checks

If you'd like to exit immediately upon a health check failure, you can pass the --require-healthy flag:

vector --config /etc/vector/vector.toml --require-healthy

Disable Health Checks

If you'd like to disable health checks for this sink you can set the healthcheck option to false.

Metric Types

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.

The following matrix outlines how Vector metric types are mapped into CloudWatch metrics types.

Vector MetricsCloudWatch Metrics
CounterData Point
GaugeData Point
Gauge Delta [1]Data Point
HistogramData Point
SetN/A
  1. 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 distributed setting, however it should be used with care.

Streaming

The aws_cloudwatch_metrics sink streams data on a real-time event-by-event basis. It does not batch data.