From dd2ef7a67ebedf53ac261007f353fbdc23a78fe0 Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Mon, 8 May 2017 11:29:26 -0700 Subject: [PATCH] Update cloudwatch documentation Mention that some metrics are available only at larger intervals than 5 minutes. Update dead links to new locations and example config. closes #1907 --- plugins/inputs/cloudwatch/README.md | 25 ++++++++++++++++++------- plugins/inputs/cloudwatch/cloudwatch.go | 2 +- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/plugins/inputs/cloudwatch/README.md b/plugins/inputs/cloudwatch/README.md index 3a3c708a2..652d517e2 100644 --- a/plugins/inputs/cloudwatch/README.md +++ b/plugins/inputs/cloudwatch/README.md @@ -9,8 +9,8 @@ API endpoint. In the following order the plugin will attempt to authenticate. 1. Assumed credentials via STS if `role_arn` attribute is specified (source credentials are evaluated from subsequent rules) 2. Explicit credentials from `access_key`, `secret_key`, and `token` attributes 3. Shared profile from `profile` attribute -4. [Environment Variables](https://github.com/aws/aws-sdk-go/wiki/configuring-sdk#environment-variables) -5. [Shared Credentials](https://github.com/aws/aws-sdk-go/wiki/configuring-sdk#shared-credentials-file) +4. [Environment Variables](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#environment-variables) +5. [Shared Credentials](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#shared-credentials-file) 6. [EC2 Instance Profile](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html) ### Configuration: @@ -20,9 +20,24 @@ API endpoint. In the following order the plugin will attempt to authenticate. ## Amazon Region (required) region = "us-east-1" + ## Amazon Credentials + ## Credentials are loaded in the following order + ## 1) Assumed credentials via STS if role_arn is specified + ## 2) explicit credentials from 'access_key' and 'secret_key' + ## 3) shared profile from 'profile' + ## 4) environment variables + ## 5) shared credentials file + ## 6) EC2 Instance Profile + #access_key = "" + #secret_key = "" + #token = "" + #role_arn = "" + #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. + # 3 minute, 5 minute, or larger 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. @@ -57,10 +72,6 @@ API endpoint. In the following order the plugin will attempt to authenticate. [[inputs.cloudwatch.metrics.dimensions]] name = "LoadBalancerName" value = "p-example" - - [[inputs.cloudwatch.metrics.dimensions]] - name = "AvailabilityZone" - value = "*" ``` #### Requirements and Terminology diff --git a/plugins/inputs/cloudwatch/cloudwatch.go b/plugins/inputs/cloudwatch/cloudwatch.go index 2e8bee671..733a17640 100644 --- a/plugins/inputs/cloudwatch/cloudwatch.go +++ b/plugins/inputs/cloudwatch/cloudwatch.go @@ -81,7 +81,7 @@ func (c *CloudWatch) SampleConfig() string { # 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. + # 3 minute, 5 minute, or larger 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.