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 Input Plugin Throttling should be configurable #1670

Closed
tmonk42 opened this issue Aug 25, 2016 · 1 comment
Closed

CloudWatch Input Plugin Throttling should be configurable #1670

tmonk42 opened this issue Aug 25, 2016 · 1 comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin

Comments

@tmonk42
Copy link
Contributor

tmonk42 commented Aug 25, 2016

Feature Request

#1197 added throttling for the CloudWatch Input Plugin. The requests per second is set to a hardcoded "10". This should be a config option to hand the case of a higher limit for a specific account or lower limit if there are other tools querying metrics.

Proposal:

Add new configuration option for inputs.cloudwatch "ratelimit" with a default of 10.
Update https://github.com/influxdata/telegraf/blob/master/plugins/inputs/cloudwatch/cloudwatch.go#L178 to use this config option

Current behavior:

Maximum requests per second is hardcoded at 10.

Desired behavior:

Maximum requests per second can be set to values higher and lower than 10

Use case: [Why is this important (helps with prioritizing requests)]

Some account can have this rate limit increased, and if there are a large number of metrics to be gathered, being able to collect at faster than 10/sec is valuable. Some account have multiple tools collecting CloudWatch metrics and might need to collect slower.

Edit: After a bit more digging, it looks like the rate limit is per namespace you define in telegraf.conf, while the AWS API rate limit is global. Ie: if you want to collect metrics from AWS/EC2, AWS/ELB, and AWS/EBS, each of those will be limited at 10 reqs/sec, which with all three running at the same time results in a maximum of 30 reqs/sec and the AWS API is limited to 10 reqs/sec resulting lots of API throttling and missed metrics. If you could configure the rate limit and you were querying metrics for multiple namespaces, you could do split up the 10req/sec among your Namespaces to keep the total under 10.

tmonk42 added a commit to tmonk42/telegraf that referenced this issue Aug 26, 2016
sparrc added a commit that referenced this issue Aug 31, 2016
* Move CloudWatch rate limit to config
Reference #1670

* make that variable a string

* ahem, apparently limiter wants an int

* add the ratelimit to the sample config

* update the test to include the rate

* set a default value of 10 for ratelimit

* Move default ratelimit to init
jackzampolin pushed a commit that referenced this issue Sep 1, 2016
@jwilder jwilder added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Sep 1, 2016
@sparrc
Copy link
Contributor

sparrc commented Sep 1, 2016

closed by #1673

@sparrc sparrc closed this as completed Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

No branches or pull requests

3 participants