Logstash-input-cloudwatch plugin errors


#1

Hi

I am having some issues with the Cloudwatch-Input-plugin for Logstash. I am getting the following error in the logs:

[2017-08-30T13:20:06,433][INFO ][logstash.inputs.cloudwatch] Polling CloudWatch API
[2017-08-30T13:20:06,434][ERROR][logstash.pipeline        ] A plugin had an unrecoverable error. Will restart this plugin.
Plugin: <LogStash::Inputs::CloudWatch access_key_id=>"<ACCESS-KEY_REDACTED>", secret_access_key=>"<SECRET-ACCESS_KEY-REDACTED", namespace=>"AWS/EC2", metrics=>["CPUUtilization"], filters=>{"tag:Monitoring"=>"Yes"}, region=>"eu-west-2", id=>"266c01d7d9b1c604c174319fa8f43b3c5548c34b-2", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_8017a454-0d72-4b4e-b913-ed1c1327d6ee", enable_metric=>true, charset=>"UTF-8">, use_ssl=>true, statistics=>["SampleCount", "Average", "Minimum", "Maximum", "Sum"], interval=>900, period=>300, combined=>false>
Error: No metrics to query
Exception: RuntimeError
Stack: /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-cloudwatch-2.0.1/lib/logstash/inputs/cloudwatch.rb:144:in `run'
org/jruby/RubyProc.java:281:in `call'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/interval.rb:20:in `interval'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-cloudwatch-2.0.1/lib/logstash/inputs/cloudwatch.rb:141:in `run'
/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:443:in `inputworker'
/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:436:in `start_input'

The input config for Logstash currently stands like this (its basic and for now the same as documented config):

input {
  cloudwatch {
    access_key_id => "<REDACTED_ACCESS-KEY>"
    secret_access_key => "<REDACTED_SECRET-ACCESS-KEY>"
    namespace => "AWS/EC2"
    metrics => [ "CPUUtilization" ]
    filters => { "tag:Monitoring" => "Yes" }
    region => "eu-west-2"
  }
}

I have tried removing all of the config apart from the bare minimum - so I am left with access key, secret access key and filters. But the error in the logs is the same.

I have tested the access using the AWS CLi connecting with the same credentials and I am able to return Cloudwatch metrics, so I am happy that the IAM for the user is setup correctly.

Version details of the plugin:

logstash-plugin list --verbose |grep input-cloudwatch
logstash-input-cloudwatch (2.0.1) 

This is on Logstash 5.4.3

Can anyone offer any pointers to what I might be missing to get this working?

TIA,
Ed


#2

Anyone had any experience with the cloudwatch input plugin and seen similar errors?


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.