# A plugin had an unrecoverable error. Will restart this plugin

**URL:** <https://discuss.elastic.co/t/a-plugin-had-an-unrecoverable-error-will-restart-this-plugin/361261>\
**Category:** Logstash\
**Tags:** elastic-stack-monitoring\
**Created:** [June 11, 2024, 1:24pm UTC](https://discuss.elastic.co/t/a-plugin-had-an-unrecoverable-error-will-restart-this-plugin/361261 "2024-06-11T13:24:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thami](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@thami](https://discuss.elastic.co/u/thami)\
**Post date:** [June 11, 2024, 1:24pm UTC](https://discuss.elastic.co/t/a-plugin-had-an-unrecoverable-error-will-restart-this-plugin/361261/1 "2024-06-11T13:24:34Z")

</div>

[2024-06-11T15:18:52,306][ERROR][logstash.javapipeline][main][426367acac36cefc65edfdc25912c990f3c7b8ca6c411d526967d63232a012e3] A plugin had an unrecoverable error. Will restart this plugin.

", "i-"]}, id=\>"426367acac36cefc65edfdc25912c990f3c7b8ca6c411d526967d63232a012e3", region=\>"af-south-1", statistics=\>["Average", "Minimum", "Maximum"], enable\_metric=\>true, role\_session\_name=\>"logstash", use\_aws\_bundled\_ca=\>false, combined=\>false\>  
Error: No metrics to query  
Exception: RuntimeError  
Stack: /usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-integration-aws-7.1.6-java/lib/logstash/inputs/cloudwatch.rb:154:in `run' /usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:414:in `inputworker'  
/usr/share/logstash/logstash-core/lib/logstash/java\_pipeline.rb:405:in `block in start\_input'  
My code.conf

```auto
input {
  cloudwatch {
    namespace => "/AWS/EC2"
    metrics => ["CPUUtilization", "EBSReadBytes", "EBSWriteBytes", "EBSReadBytes"]
    filters => { "InstanceId" => ["i-", "i-", "i-"] }
    region => "af-south-1"
    statistics => ["Average", "Minimum", "Maximum"]
    interval => 900
    #role_session_name => "LogstashRORole"
    period => 300
    codec => "json"

  }
}

output {
  elasticsearch {
    hosts => ["http://ip:9200/"]
    index => "logstash-test-10-06"
  }
  stdout { codec => rubydebug }
}

```

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [June 13, 2024, 8:44am UTC](https://discuss.elastic.co/t/a-plugin-had-an-unrecoverable-error-will-restart-this-plugin/361261/2 "2024-06-13T08:44:08Z")

</div>

Hi @thami,

Welcome to the community! I see you're using `logstash-integration-aws-7.1.6-java`. Which version of Logstash are you using it with?

Have you removed the AWS credentials for the purpose of posting? I wonder if you need to specify the credentials as specified in [this StackOverflow post](https://stackoverflow.com/questions/43602535/logstash-input-cloudwatch-plugin-not-working).

Let us know!

---

<div class="post-metadata">

**Author:** ![thami](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@thami](https://discuss.elastic.co/u/thami)\
**Post date:** [June 13, 2024, 11:55am UTC](https://discuss.elastic.co/t/a-plugin-had-an-unrecoverable-error-will-restart-this-plugin/361261/3 "2024-06-13T11:55:53Z")

</div>

Hi CArly, I am curently on logstash-8.14.1

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [June 17, 2024, 9:52am UTC](https://discuss.elastic.co/t/a-plugin-had-an-unrecoverable-error-will-restart-this-plugin/361261/4 "2024-06-17T09:52:36Z")

</div>

Thanks for confirming.

> [@thami](#):
>
> Error: No metrics to query

I wonder if you are having the same issue as [this one with the cloudwatch plugin](https://discuss.elastic.co/t/logstash-cloudwatch-plugin-error/254337). Have you tried specifying filters in your config?
