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 output uses ListMetricData #3319

Closed
adamchainz opened this issue Oct 10, 2017 · 2 comments
Closed

cloudwatch output uses ListMetricData #3319

adamchainz opened this issue Oct 10, 2017 · 2 comments
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@adamchainz
Copy link
Contributor

adamchainz commented Oct 10, 2017

Bug report

When starting the Cloudwatch output plugin, it tries to list some metrics, even though this isn't needed for normal operation:

func (c *CloudWatch) Connect() error {
. Thus the AWS credentials in use need access to ListMetricData even though when in use the plugin only needs PutMetricData.

The required permissions aren't even documented for the plugin.

Relevant telegraf.conf:

[[outputs.cloudwatch]]
region = "us-east-1"
namespace = "foo"

System info:

Latest telegraf

Steps to reproduce:

  1. Create an AWS IAM user/role with only PutMetricData rights
  2. Configure cloudwatch output in telegraf, start it

Expected behavior:

Successful start

Actual behavior:

It fails

Additional info:

AWS STS GetSessionToken can be used to test connection without needing any specific permissions: https://docs.aws.amazon.com/sdk-for-go/api/service/sts/#STS.GetSessionToken

@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Oct 10, 2017
@danielnelson danielnelson added this to the 1.5.0 milestone Oct 10, 2017
@danielnelson
Copy link
Contributor

Thanks for the report, I agree on all points. Is this something you would be able to work on?

@adamchainz
Copy link
Contributor Author

Never used this language before but I’ll give it a... Go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants