# Filebeat Multiline not working

**URL:** <https://discuss.elastic.co/t/filebeat-multiline-not-working/276506>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 21, 2021, 8:43am UTC](https://discuss.elastic.co/t/filebeat-multiline-not-working/276506 "2021-06-21T08:43:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SLIM\_SLIM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/slim_slim/32/90463_2.png) [@SLIM\_SLIM](https://discuss.elastic.co/u/SLIM_SLIM)\
**Post date:** [June 21, 2021, 8:43am UTC](https://discuss.elastic.co/t/filebeat-multiline-not-working/276506/1 "2021-06-21T08:43:01Z")

</div>

Hi, i want to regroup lines in log file (5 lines max), i want to regroup lines until (default task-XX) This is my filebeat config :

```auto
fields_under_root: true
  multiline.type: pattern
  multiline.pattern: '[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3} * [A-Z]{3,5} * \[*[a-z]{1,10}\] * \(([^)]+)\)'
  multiline.negate: false
  multiline.match: after
  multiline.max_lines: 5

```

Here is an example of lines :

```auto
2021-06-16 10:32:57,679 ERROR [stderr] (default task-51) com.itnsa.fwk.exception.T9RuntimeException: Ce contrat est introuvable pour POL_IDENT = [11 381 782], traitement impossible

2021-06-16 10:32:57,679 ERROR [stderr] (default task-51) at com.itnsa.assurance.soa.impl.SOAChargementContratImpl.chargeme

2021-06-16 10:32:57,679 ERROR [stderr] (default task-84) com.itnsa.fwk.exception.T9RuntimeException: Ce contrat est introuvable pour POL_IDENT = [11 381 782], traitement impossible

2021-06-16 10:32:57,679 ERROR [stderr] (default task-84) at com.itnsa.assurance.soa.impl.SOAChargementContratImpl.chargeme

2021-06-16 10:32:57,679 ERROR [stderr] (default task-84) com.itnsa.fwk.exception.T9RuntimeException: Ce contrat est introuvable pour POL_IDENT = [11 381 782], traitement impossible

```

Combination of lines is not working please help me for this.

---

<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:** [July 19, 2021, 10:43am UTC](https://discuss.elastic.co/t/filebeat-multiline-not-working/276506/2 "2021-07-19T10:43:36Z")

</div>

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