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

Cloudwatch plugin needs some throttling #1197

Closed
goller opened this issue May 13, 2016 · 6 comments · Fixed by #1253
Closed

Cloudwatch plugin needs some throttling #1197

goller opened this issue May 13, 2016 · 6 comments · Fixed by #1253

Comments

@goller
Copy link
Contributor

goller commented May 13, 2016

I'm getting API throttling from AWS when I'm using cloudwatch plugin. It would be nice to have some throttling. AWS has guidelines here: http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_limits.html

@sparrc
Copy link
Contributor

sparrc commented May 16, 2016

can this not be controlled by using the interval config option?

@goller
Copy link
Contributor Author

goller commented May 16, 2016

Sadly, no:
https:/influxdata/telegraf/blob/master/plugins/inputs/cloudwatch/cloudwatch.go#L142
https:/influxdata/telegraf/blob/master/plugins/inputs/cloudwatch/cloudwatch.go#L221

If I'm reading this correctly, this will create 64 concurrent requests to AWS. Additionally, there is no delay in executing subsequent requests.

sparrc added a commit that referenced this issue May 24, 2016
sparrc added a commit that referenced this issue May 24, 2016
sparrc added a commit that referenced this issue May 26, 2016
sparrc added a commit that referenced this issue May 26, 2016
sparrc added a commit that referenced this issue May 26, 2016
sparrc added a commit that referenced this issue May 27, 2016
sparrc added a commit that referenced this issue May 27, 2016
sparrc added a commit that referenced this issue May 27, 2016
sparrc added a commit that referenced this issue May 31, 2016
sparrc added a commit that referenced this issue May 31, 2016
@catufunwa
Copy link

Hey! I'm still getting throttling from AWS even with version 1.0.0-beta3, is there a config I need to add to enable this?

@sparrc
Copy link
Contributor

sparrc commented Aug 16, 2016

there isn't, it should be doing it automatically, but we might want to add a config option for how many requests per second to limit it to

@tmonk42
Copy link
Contributor

tmonk42 commented Aug 25, 2016

Considering that the API rate limit for GetMetricStatistics can be raised (ie: I might want that throttle higher) and I might have other tools querying metrics against the account (ie: I might want that throttle lower), feels correct that the requests per second cap should be a config option.

Relatedly, if I define multiple inputs.cloudwatch sections, is the throttle global for all of Telegraf or per input/namespace?

@sparrc
Copy link
Contributor

sparrc commented Aug 26, 2016

@tmonk42 it's per input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants