# Logstash - Is it Possible To Handle Dissect Failures Without Filling Up Syslog

**URL:** <https://discuss.elastic.co/t/logstash-is-it-possible-to-handle-dissect-failures-without-filling-up-syslog/246044>\
**Category:** Logstash\
**Created:** [August 24, 2020, 2:39am UTC](https://discuss.elastic.co/t/logstash-is-it-possible-to-handle-dissect-failures-without-filling-up-syslog/246044 "2020-08-24T02:39:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott\_stash](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@scott\_stash](https://discuss.elastic.co/u/scott_stash)\
**Post date:** [August 24, 2020, 2:39am UTC](https://discuss.elastic.co/t/logstash-is-it-possible-to-handle-dissect-failures-without-filling-up-syslog/246044/1 "2020-08-24T02:39:53Z")

</div>

Hello ELK Community,

I have a pipeline that processes a certain type of log file, depending on where the log file was generated the fields may be different, this causes my dissect to fail.

With the following code block I can catch the failure, run a GROK and parse it successfully(or run a second dissect):

```auto
 if ("_dissectfailure" in [tags]) {
        grok {
            match => {"message" => ["..."] }
            remove_field => ["tags"]
        }
    }

```

The problem is my syslog logs an error message for every dissect failure, this causes disk space issues and the people. Is there a way to better handle this scenario? I think setting tag\_on\_failure to false still causes the ERROR to log.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 24, 2020, 3:25pm UTC](https://discuss.elastic.co/t/logstash-is-it-possible-to-handle-dissect-failures-without-filling-up-syslog/246044/2 "2020-08-24T15:25:13Z")

</div>

> [@scott\_stash](#):
>
> The problem is my syslog logs an error message for every dissect failure

What gets logged?

---

<div class="post-metadata">

**Author:** ![scott\_stash](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@scott\_stash](https://discuss.elastic.co/u/scott_stash)\
**Post date:** [August 25, 2020, 1:07am UTC](https://discuss.elastic.co/t/logstash-is-it-possible-to-handle-dissect-failures-without-filling-up-syslog/246044/3 "2020-08-25T01:07:37Z")

</div>

```auto
Aug 24 12:19:02 machinename.fqdn.com logstash[23808]: [2020-08-24T12:19:02,454][WARN][org.logstash.dissect.Dissector] Dissector mapping, pattern not found {"field"=>"message", "pattern"=>"%{logTimestamp} %{logClass} %{} %{logLevel} %{logMessage}", "event"=>{}}

```

I removed the event data.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 25, 2020, 1:23am UTC](https://discuss.elastic.co/t/logstash-is-it-possible-to-handle-dissect-failures-without-filling-up-syslog/246044/4 "2020-08-25T01:23:23Z")

</div>

The dissector is [quite aggresive](https://github.com/logstash-plugins/logstash-filter-dissect/blob/30cfb888e01e8cdd11a4a5f9b078128681543c33/src/main/java/org/logstash/dissect/JavaDissectorLibrary.java#L152) about logging warnings, that is why it recommends doing a [pattern check](https://www.elastic.co/guide/en/logstash/current/plugins-filters-dissect.html#_conditional_processing) to be sure the dissect will work.

---

<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 22, 2020, 1:23am UTC](https://discuss.elastic.co/t/logstash-is-it-possible-to-handle-dissect-failures-without-filling-up-syslog/246044/5 "2020-09-22T01:23:49Z")

</div>

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