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

Telegraf cloudwatch inputs throws errors like *E! [inputs.cloudwatch]: Error in plugin: no metrics found to collect* #6337

Closed
hflamboauto1 opened this issue Sep 2, 2019 · 7 comments · Fixed by #6630
Labels
area/aws AWS plugins including cloudwatch, ecs, kinesis feature request Requests for new plugin and for new features to existing plugins good first issue This is a smaller issue suited for getting started in Telegraf, Golang, and contributing to OSS.
Milestone

Comments

@hflamboauto1
Copy link

hflamboauto1 commented Sep 2, 2019

Relevant telegraf.conf:

[[inputs.cloudwatch]]
  region = "eu-west-1"
  interval = "5m"
  namespace = "AWS/RDS"
  period = "1m"
  delay = "0s"

System info:

Telegraf 1.11.5

Steps to reproduce:

  1. ... Add cloudwatch input to a region / namespace that has no activity e.g AWS/RDS with no running instances from a while.

Expected behavior:

Error message should be a WARN and not an ERROR and logged message would be great to have more info(s) like the relevant namespace and region of target cloudwatch input

I n case warn is found to not be useful .. then info would be great

Actual behavior:

Current

E! [inputs.cloudwatch]: Error in plugin: no metrics found to collect

Also would be very useful to output on message the relevant input namespace .eg AWS/RDS

Wanted

W! [inputs.cloudwatch]: Error in plugin: no metrics found to collect from namespace: AWS/RDS

Additional info:

2019-09-02T12:15:00Z E! [inputs.cloudwatch]: Error in plugin: no metrics found to collect
@glinton glinton added area/aws AWS plugins including cloudwatch, ecs, kinesis feature request Requests for new plugin and for new features to existing plugins labels Sep 3, 2019
@glinton
Copy link
Contributor

glinton commented Sep 3, 2019

@danielnelson would this be better as a debug log?

@glinton glinton added the good first issue This is a smaller issue suited for getting started in Telegraf, Golang, and contributing to OSS. label Sep 3, 2019
@danielnelson
Copy link
Contributor

Yes. For the extra logging info we should stick to the the new alias feature, since otherwise we would potentially need to add the entire plugins configuration in order for it to be identified.

@nwneisen
Copy link
Contributor

nwneisen commented Nov 6, 2019

I'd like to help with this.

I found where I can change this to a debug log and append the namespace before the error string is returned from the plugin. I'm now getting the desired output mentioned above.

@danielnelson can you explain what you meant by the new alias feature?

@danielnelson
Copy link
Contributor

Can you open a pull request with the change you made?

On the alias feature, it is a new feature in 1.12 though isn't fully implemented on all plugins, might need master for this plugin. It works like this: set the alias using the alias option that works on all plugins:

[[inputs.cloudwatch]]
  alias = "myfavoriteplugin"

This will cause the logger to mention the alias, from memory it looks like:

E! [inputs.cloudwatch::myfavoriteplugin] Error in plugin...

It also adds a tag to the internal metrics from the plugin.

@nwneisen
Copy link
Contributor

nwneisen commented Nov 7, 2019

Thanks for explaining. Would you like to stick with the alias rather than adding the namespace to the error string?

PR is on the way. My first contribution to telegraf and I still need to go through the PR setup.

@danielnelson
Copy link
Contributor

Yeah, let's use the alias rather than including the namespace. My thinking is that we don't want to get in the business of printing out the value of configuration option in order for it to be tied back to the plugin instance.

@nwneisen
Copy link
Contributor

nwneisen commented Nov 7, 2019

PR is in. I checked and alias is already implemented on this plugin.

@danielnelson danielnelson added this to the 1.12.5 milestone Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/aws AWS plugins including cloudwatch, ecs, kinesis feature request Requests for new plugin and for new features to existing plugins good first issue This is a smaller issue suited for getting started in Telegraf, Golang, and contributing to OSS.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants