Documentation

Amazon CloudWatch Output Plugin

This plugin writes metrics to the Amazon CloudWatch service.

Introduced in: Telegraf v0.10.1 Tags: cloud OS support: all

Amazon Authentication

This plugin uses a credential chain for Authentication with the CloudWatch API endpoint. In the following order the plugin will attempt to authenticate.

  1. Web identity provider credentials via STS if role_arn and web_identity_token_file are specified
  2. Assumed credentials via STS if role_arn attribute is specified (source credentials are evaluated from subsequent rules)
  3. Explicit credentials from access_key, secret_key, and token attributes
  4. Shared profile from profile attribute
  5. Environment Variables
  6. Shared Credentials
  7. EC2 Instance Profile

If you are using credentials from a web identity provider, you can specify the session name using role_session_name. If left empty, the current timestamp will be used.

The IAM user needs only the cloudwatch:PutMetricData permission.

Global configuration options

Plugins support additional global and plugin configuration settings for tasks such as modifying metrics, tags, and fields, creating aliases, and configuring plugin ordering. See CONFIGURATION.md for more details.

Configuration

# Configuration for AWS CloudWatch output.
[[outputs.cloudwatch]]
  ## Amazon REGION
  region = "us-east-1"

  ## Amazon Credentials
  ## Credentials are loaded in the following order
  ## 1) Web identity provider credentials via STS if role_arn and
  ##    web_identity_token_file are specified
  ## 2) Assumed credentials via STS if role_arn is specified
  ## 3) explicit credentials from 'access_key' and 'secret_key'
  ## 4) shared profile from 'profile'
  ## 5) environment variables
  ## 6) shared credentials file
  ## 7) EC2 Instance Profile
  # access_key = ""
  # secret_key = ""
  # token = ""
  # role_arn = ""
  # web_identity_token_file = ""
  # role_session_name = ""
  # profile = ""
  # shared_credential_file = ""

  ## Override the auto-detected endpoint to make request against
  ##   ex: endpoint_url = "http://localhost:8000"
  # endpoint_url = ""

  ## Set http_proxy
  # use_system_proxy = false
  # http_proxy_url = "http://localhost:8888"

  ## Namespace for the CloudWatch MetricDatums
  namespace = "InfluxData/Telegraf"

  ## If you have a large amount of metrics, you should consider to send
  ## statistic values instead of raw metrics which could not only improve
  ## performance but also save AWS API cost. If enable this flag, this plugin
  ## would parse the required CloudWatch statistic fields (count, min, max, and
  ## sum) and send them to CloudWatch. You could use basicstats aggregator to
  ## calculate those fields. If not all statistic fields are available, all
  ## fields would still be sent as raw metrics.
  # write_statistics = false

  ## Enable high resolution metrics of 1 second (if not enabled, standard
  ## resolution are of 60 seconds precision)
  # high_resolution_metrics = false

  ## Maximum number of dimensions to include in the metric
  ## The default is ten for backward compatibility but Cloudwatch supports
  ## up to 30 dimensions in a metric according to
  ## https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html#usingDimensions
  # max_dimensions = 10

For this output plugin to function correctly the following variables must be configured.

  • region
  • namespace

region

The region is the Amazon region that you wish to connect to. Examples include but are not limited to:

  • us-west-1
  • us-west-2
  • us-east-1
  • ap-southeast-1
  • ap-southeast-2

namespace

The namespace used for AWS CloudWatch metrics.

write_statistics

If you have a large amount of metrics, you should consider to send statistic values instead of raw metrics which could not only improve performance but also save AWS API cost. If enable this flag, this plugin would parse the required CloudWatch statistic fields (count, min, max, and sum) and send them to CloudWatch. You could use basicstats aggregator to calculate those fields. If not all statistic fields are available, all fields would still be sent as raw metrics.

high_resolution_metrics

Enable high resolution metrics (1 second precision) instead of standard ones (60 seconds precision).


Was this page helpful?

Thank you for your feedback!


InfluxDB 3.9: Performance upgrade preview

InfluxDB 3 Enterprise 3.9 includes a beta of major performance upgrades with faster single-series queries, wide-and-sparse table support, and more.

InfluxDB 3 Enterprise 3.9 includes a beta of major performance and feature updates.

Key improvements:

  • Faster single-series queries
  • Consistent resource usage
  • Wide-and-sparse table support
  • Automatic distinct value caches for reduced latency with metadata queries

Preview features are subject to breaking changes.

For more information, see:

Telegraf Enterprise now in public beta

Get early access to the Telegraf Controller and provide feedback to help shape the future of Telegraf Enterprise.

See the Blog Post

The upcoming Telegraf Enterprise offering is for organizations running Telegraf at scale and is comprised of two key components:

  • Telegraf Controller: A control plane (UI + API) that centralizes Telegraf configuration management and agent health visibility.
  • Telegraf Enterprise Support: Official support for Telegraf Controller and Telegraf plugins.

Join the Telegraf Enterprise beta to get early access to the Telegraf Controller and provide feedback to help shape the future of Telegraf Enterprise.

For more information:

Telegraf Controller v0.0.6-beta now available

Telegraf Controller v0.0.6-beta is now available with new features, improvements, and bug fixes.

View the release notes
Download Telegraf Controller v0.0.6-beta

InfluxDB Docker latest tag changing to InfluxDB 3 Core

On May 27, 2026, the latest tag for InfluxDB Docker images will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments.

If using Docker to install and run InfluxDB, the latest tag will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments. For example, if using Docker to run InfluxDB v2, replace the latest version tag with a specific version tag in your Docker pull command–for example:

docker pull influxdb:2