# Logstash-input-cloudwatch plugin errors

**URL:** <https://discuss.elastic.co/t/logstash-input-cloudwatch-plugin-errors/98955>\
**Category:** Logstash\
**Created:** [August 31, 2017, 7:16am UTC](https://discuss.elastic.co/t/logstash-input-cloudwatch-plugin-errors/98955 "2017-08-31T07:16:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![blurry](https://avatars.discourse-cdn.com/v4/letter/b/ccd318/32.png) [@blurry](https://discuss.elastic.co/u/blurry)\
**Post date:** [August 31, 2017, 7:16am UTC](https://discuss.elastic.co/t/logstash-input-cloudwatch-plugin-errors/98955/1 "2017-08-31T07:16:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![blurry](https://avatars.discourse-cdn.com/v4/letter/b/ccd318/32.png) [@blurry](https://discuss.elastic.co/u/blurry)\
**Post date:** [September 1, 2017, 8:04am UTC](https://discuss.elastic.co/t/logstash-input-cloudwatch-plugin-errors/98955/2 "2017-09-01T08:04:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 29, 2017, 8:04am UTC](https://discuss.elastic.co/t/logstash-input-cloudwatch-plugin-errors/98955/3 "2017-09-29T08:04:09Z")

</div>

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