# Filebeat error while parsing multiline parser config

**URL:** <https://discuss.elastic.co/t/filebeat-error-while-parsing-multiline-parser-config/331089>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 28, 2023, 10:36pm UTC](https://discuss.elastic.co/t/filebeat-error-while-parsing-multiline-parser-config/331089 "2023-04-28T22:36:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![paolovalladolid](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@paolovalladolid](https://discuss.elastic.co/u/paolovalladolid)\
**Post date:** [April 28, 2023, 10:36pm UTC](https://discuss.elastic.co/t/filebeat-error-while-parsing-multiline-parser-config/331089/1 "2023-04-28T22:36:29Z")

</div>

I am using Filebeat 8.7. I am trying to follow the instructions here:

> **[Manage multiline messages | Filebeat Reference \[8.7\] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/multiline-examples.html)**

I double checked the indentation. Cannot figure out what is wrong. I just want to make sure  
a multi-line stack trace is captured into one document instead of one document indexed per line of the stack trace. I see there is an example for the stack trace but I want to make sure the simplest config is working before attempting a more complicated one.

This is the relevant portion of the filebeat.yml

```auto
filebeat.inputs:

# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.

- type: filestream
  id: ams-api
  fields:
    app_id: ams-api
  paths:
    - /opt/amsdev/logs/ams-api-logs/ams-api.log
  parsers:
    - multiline:
      type: pattern
      pattern: '\\$'
      negate: false
      match: before

- type: filestream
  id: ams-cache-manager
  fields:
    app_id: ams-cache-manager
  paths:
    - /opt/amsdev/logs/ams-cache-manager-logs/ams-cache-manager.log

```

Error from journalctl:

`Exiting: Failed to start crawler: starting input failed: error while initializing input: error while parsing multiline parser config: unknown matcher type: accessing 'filebeat.inputs.0.parsers.0.multiline' accessing 'filebeat.inputs.0' (source:'/etc/filebeat/filebeat.yml')","service.name":"filebeat","ecs.version":"1.6.0"`

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 28, 2023, 11:16pm UTC](https://discuss.elastic.co/t/filebeat-error-while-parsing-multiline-parser-config/331089/2 "2023-04-28T23:16:25Z")

</div>

Hi @paolovalladolid

Nope, indentation is not correct...  
The parser list starts a the same level of `multiline`  
Type pattern, etc. Need to be indented from the multiline like the example in the docs you referenced.

```auto
  parsers:
  - multiline:
      type: pattern
      pattern: '\\$'
      negate: false
      match: before

```

---

<div class="post-metadata">

**Author:** ![paolovalladolid](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@paolovalladolid](https://discuss.elastic.co/u/paolovalladolid)\
**Post date:** [May 4, 2023, 2:47pm UTC](https://discuss.elastic.co/t/filebeat-error-while-parsing-multiline-parser-config/331089/3 "2023-05-04T14:47:05Z")

</div>

Thanks! Fixing the note indentation fixed the issue.

---

<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:** [June 1, 2023, 4:47pm UTC](https://discuss.elastic.co/t/filebeat-error-while-parsing-multiline-parser-config/331089/4 "2023-06-01T16:47:17Z")

</div>

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