Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[outputs.cloudwatch] PutMetricsData payload is too large #16385

Open
tory-kk opened this issue Jan 9, 2025 · 0 comments
Open

[outputs.cloudwatch] PutMetricsData payload is too large #16385

tory-kk opened this issue Jan 9, 2025 · 0 comments
Labels
bug unexpected problem or unintended behavior

Comments

@tory-kk
Copy link

tory-kk commented Jan 9, 2025

Relevant telegraf.conf

[[outputs.cloudwatch]]
  metric_batch_size = 1000 (default)

Logs from Telegraf

[outputs.cloudwatch] Unable to write to CloudWatch : operation error CloudWatch: PutMetricData, https response error StatusCode: 413

System info

Telegraf 1.28.3+ (up to master that is 1.33.0 now)

Docker

No response

Steps to reproduce

Was able to get an error with the default value of metric_batch_size and 10 dimensions for each metric

Expected behavior

CloudWatch output plugin splits metrics for batches by size in addition to count

Actual behavior

CloudWatch output plugin splits metrics for batches only by count (

// PutMetricData only supports up to 1000 data metrics per call
// https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricData.html
const maxDatumsPerCall = 1000
) while AWS documentation (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricData.html) says that request is also limited to 1 MB

Additional info

No response

@tory-kk tory-kk added the bug unexpected problem or unintended behavior label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant