Skip to content

Commit

Permalink
Update docs on Cloudwatch. Set default period to 5m. (#2000)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnrengelman authored and sparrc committed Nov 7, 2016
1 parent a90a687 commit 8ecfe13
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 15 deletions.
7 changes: 3 additions & 4 deletions etc/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1979,4 +1979,3 @@
#
# [inputs.webhooks.rollbar]
# path = "/rollbar"

23 changes: 15 additions & 8 deletions plugins/inputs/cloudwatch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down
13 changes: 10 additions & 3 deletions plugins/inputs/cloudwatch/cloudwatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ecfe13

Please sign in to comment.