From 5d3850c44e048f5619a04c14373c3324c2c9c407 Mon Sep 17 00:00:00 2001 From: John Engelman Date: Mon, 7 Nov 2016 06:14:04 -0600 Subject: [PATCH] Update docs on Cloudwatch. Set default period to 5m. (#2000) --- etc/telegraf.conf | 7 +++---- plugins/inputs/cloudwatch/README.md | 23 +++++++++++++++-------- plugins/inputs/cloudwatch/cloudwatch.go | 13 ++++++++++--- 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/etc/telegraf.conf b/etc/telegraf.conf index b999713a7..8ebf0a7a7 100644 --- a/etc/telegraf.conf +++ b/etc/telegraf.conf @@ -641,14 +641,14 @@ # #shared_credential_file = "" # # ## Requested CloudWatch aggregation Period (required - must be a multiple of 60s) -# period = "1m" +# period = "5m" # # ## Collection Delay (required - must account for metrics availability via CloudWatch API) -# delay = "1m" +# delay = "5m" # # ## Recomended: use metric 'interval' that is a multiple of 'period' to avoid # ## gaps or overlap in pulled data -# interval = "1m" +# interval = "5m" # # ## Configure the TTL for the internal cache of metrics. # ## Defaults to 1 hr if not specified @@ -1979,4 +1979,3 @@ # # [inputs.webhooks.rollbar] # path = "/rollbar" - diff --git a/plugins/inputs/cloudwatch/README.md b/plugins/inputs/cloudwatch/README.md index ca7145c30..643e18c3b 100644 --- a/plugins/inputs/cloudwatch/README.md +++ b/plugins/inputs/cloudwatch/README.md @@ -20,16 +20,23 @@ API endpoint. In the following order the plugin will attempt to authenticate. ## Amazon Region (required) region = "us-east-1" + # The minimum period for Cloudwatch metrics is 1 minute (60s). However not all + # metrics are made available to the 1 minute period. Some are collected at + # 3 minute and 5 minutes intervals. See https://aws.amazon.com/cloudwatch/faqs/#monitoring. + # Note that if a period is configured that is smaller than the minimum for a + # particular metric, that metric will not be returned by the Cloudwatch API + # and will not be collected by Telegraf. + # ## Requested CloudWatch aggregation Period (required - must be a multiple of 60s) - period = "1m" + period = "5m" ## Collection Delay (required - must account for metrics availability via CloudWatch API) - delay = "1m" + delay = "5m" ## Override global run interval (optional - defaults to global interval) ## Recomended: use metric 'interval' that is a multiple of 'period' to avoid ## gaps or overlap in pulled data - interval = "1m" + interval = "5m" ## Metric Statistic Namespace (required) namespace = "AWS/ELB" @@ -71,16 +78,16 @@ wildcard dimension is ignored. Example: ``` [[inputs.cloudwatch.metrics]] - names = ['Latency'] + names = ["Latency"] ## Dimension filters for Metric (optional) [[inputs.cloudwatch.metrics.dimensions]] - name = 'LoadBalancerName' - value = 'p-example' + name = "LoadBalancerName" + value = "p-example" [[inputs.cloudwatch.metrics.dimensions]] - name = 'AvailabilityZone' - value = '*' + name = "AvailabilityZone" + value = "*" ``` If the following ELBs are available: diff --git a/plugins/inputs/cloudwatch/cloudwatch.go b/plugins/inputs/cloudwatch/cloudwatch.go index c3dbda05b..bc8de313e 100644 --- a/plugins/inputs/cloudwatch/cloudwatch.go +++ b/plugins/inputs/cloudwatch/cloudwatch.go @@ -80,15 +80,22 @@ func (c *CloudWatch) SampleConfig() string { #profile = "" #shared_credential_file = "" + # The minimum period for Cloudwatch metrics is 1 minute (60s). However not all + # metrics are made available to the 1 minute period. Some are collected at + # 3 minute and 5 minutes intervals. See https://aws.amazon.com/cloudwatch/faqs/#monitoring. + # Note that if a period is configured that is smaller than the minimum for a + # particular metric, that metric will not be returned by the Cloudwatch API + # and will not be collected by Telegraf. + # ## Requested CloudWatch aggregation Period (required - must be a multiple of 60s) - period = "1m" + period = "5m" ## Collection Delay (required - must account for metrics availability via CloudWatch API) - delay = "1m" + delay = "5m" ## Recomended: use metric 'interval' that is a multiple of 'period' to avoid ## gaps or overlap in pulled data - interval = "1m" + interval = "5m" ## Configure the TTL for the internal cache of metrics. ## Defaults to 1 hr if not specified