# What is wrong with my logstash config?

**URL:** https://discuss.elastic.co/t/what-is-wrong-with-my-logstash-config/79098
**Category:** Logstash
**Created:** [March 17, 2017, 9:27pm UTC](https://discuss.elastic.co/t/what-is-wrong-with-my-logstash-config/79098 "2017-03-17T21:27:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![andre22](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@andre22](https://discuss.elastic.co/u/andre22)
#### Post date: [March 17, 2017, 9:27pm UTC](https://discuss.elastic.co/t/what-is-wrong-with-my-logstash-config/79098/1 "2017-03-17T21:27:59Z")

</div>

Hi,

Logstash complains that this config file is wrong, but I don't see where:

```
input { 
  beats {
    port => 5044
  }
}
filter {
  if "knxmonitor" in [tags] {
    grok {
      match => { "message" => "\A%{TIMESTAMP_ISO8601:eventtime};%{NOTSPACE};%{CRON_ACTION:abc}" }
    }
  }
output {
  elasticsearch { hosts => ["localhost:9200"] }
}

```

I checked for wrong spaces and so on - nothing. This is the error I am receiving:

[2017-03-17T22:25:36,832][ERROR][logstash.agent] Cannot load an invalid configuration {:reason=\>"Expected one of #, =\> at line 13, column 17 (byte 226) after filter {\n if "knxmonitor" in [tags] {\n grok {\n match =\> { "message" =\> "\A%{TIMESTAMP\_ISO8601:eventtime};%{NOTSPACE};%{CRON\_ACTION:abc}" }\n }\n }\noutput {\n elasticsearch "}

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [March 17, 2017, 9:46pm UTC](https://discuss.elastic.co/t/what-is-wrong-with-my-logstash-config/79098/2 "2017-03-17T21:46:10Z")

</div>

You need one more } at the end of your filter block, right before the word `output`. Count the closing and opening curly braces.

---

<div class="post-metadata">

### Author: ![andre22](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@andre22](https://discuss.elastic.co/u/andre22)
#### Post date: [March 17, 2017, 9:47pm UTC](https://discuss.elastic.co/t/what-is-wrong-with-my-logstash-config/79098/3 "2017-03-17T21:47:09Z")

</div>

I realised it in the exact second. What a shame 😊

thanks a lot!

---

<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: [April 14, 2017, 9:47pm UTC](https://discuss.elastic.co/t/what-is-wrong-with-my-logstash-config/79098/4 "2017-04-14T21:47:12Z")

</div>

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