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

Single-quotted durations are not being parsed properly #2023

Closed
antoinerrr opened this issue Nov 9, 2016 · 10 comments · Fixed by #2024
Closed

Single-quotted durations are not being parsed properly #2023

antoinerrr opened this issue Nov 9, 2016 · 10 comments · Fixed by #2024
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@antoinerrr
Copy link

Bug report

Relevant telegraf.conf:

[[inputs.cloudwatch]]
  region = 'eu-west-1'
  period = '1m'
  delay = '1m'
  interval = '1m'
  namespace = 'AWS/ELB'
  [[inputs.cloudwatch.metrics]]
    names = ['RequestCount', 'HTTPCode_Backend_4XX', 'Latency']
    [[inputs.cloudwatch.metrics.dimensions]]
      name = 'LoadBalancerName'
      value = 'awseb-e-8-xxxxxxx'

System info:

Telegraf v1.1.0 (git: release-1.1.0 8ecfe13)
AWS linux

Steps to reproduce:

1- Use my conf
2- run Telegraf

Expected behavior:

Data import with no issue

Actual behavior:

2016/11/09 16:11:30 E! ERROR in input [inputs.cloudwatch]: Errors encountered: [InvalidParameterValue: The parameter StartTime must not equal parameter EndTime.
	status code: 400, request id: cada001c-a68e-11e6-b82d-af8d232318ca], [InvalidParameterValue: The parameter StartTime must not equal parameter EndTime.
	status code: 400, request id: cada26a6-a68e-11e6-8558-d13147ee8794], [InvalidParameterValue: The parameter StartTime must not equal parameter EndTime.
	status code: 400, request id: cada4e6b-a68e-11e6-9bce-1ba48e9b8750], [InvalidParameterValue: The parameter StartTime must not equal parameter EndTime.
	status code: 400, request id: cadac311-a68e-11e6-9a00-b37caae06e6d], [InvalidParameterValue: The parameter StartTime must not equal parameter EndTime.
	status code: 400, request id: cada7544-a68e-11e6-91a2-6f4e21ef2c81], [InvalidParameterValue: The parameter StartTime must not equal parameter EndTime.

Additional info:

Working great until i rebuild my stack :/

@sparrc
Copy link
Contributor

sparrc commented Nov 9, 2016

Working great until i rebuild my stack :/

what do you mean by this? was this working in a previous version?

@sparrc
Copy link
Contributor

sparrc commented Nov 9, 2016

cc @johnrengelman

@antoinerrr
Copy link
Author

Same version i guess, i'm using the repo to install telegraf, my last test was a week ago but there as been no change to the Cloudwatch plugin for that period

@sparrc
Copy link
Contributor

sparrc commented Nov 9, 2016

version 1.1 was released just a few days ago, you may have been using version 1.0.1 before.

@antoinerrr
Copy link
Author

Probably yes, but the "time related function" on the plugin haven't change :/. Strange behavior. I did not say but I of course use the same configuration file during my tests

@johnrengelman
Copy link
Contributor

I don't see how this could happen unless you set period to 0 - https://github.com/influxdata/telegraf/blob/master/plugins/inputs/cloudwatch/cloudwatch.go#L351-L352

@sparrc
Copy link
Contributor

sparrc commented Nov 9, 2016

might be due to toml parsing of the duration field, which did change in 1.1

@antoiner77 could you change your ' to "?

@johnrengelman
Copy link
Contributor

oh yeah...that's totally it. gah. stupid single quotes. they come back as 0 if you have something like '1m'

@antoinerrr
Copy link
Author

wrote batch of 13 metrics. Yea that was the issue. Thank you guys

@sparrc sparrc added the bug unexpected problem or unintended behavior label Nov 9, 2016
@sparrc
Copy link
Contributor

sparrc commented Nov 9, 2016

OK, I will get a fix in for this, 1.1.1 here we come, whatta day!! 😭

sparrc added a commit that referenced this issue Nov 9, 2016
sparrc added a commit that referenced this issue Nov 10, 2016
@sparrc sparrc changed the title CloudWatch time error Single-quotted durations are not being parsed properly Nov 10, 2016
@sparrc sparrc added this to the 1.1.1 milestone Nov 10, 2016
sparrc added a commit that referenced this issue Nov 10, 2016
sparrc added a commit that referenced this issue Nov 14, 2016
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

Successfully merging a pull request may close this issue.

3 participants