# Multiline Configuration / Java Stack Trace

**URL:** <https://discuss.elastic.co/t/multiline-configuration-java-stack-trace/149107>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 19, 2018, 10:58am UTC](https://discuss.elastic.co/t/multiline-configuration-java-stack-trace/149107 "2018-09-19T10:58:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cschlaefcke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cschlaefcke/32/35615_2.png) [@cschlaefcke](https://discuss.elastic.co/u/cschlaefcke)\
**Post date:** [September 19, 2018, 10:58am UTC](https://discuss.elastic.co/t/multiline-configuration-java-stack-trace/149107/1 "2018-09-19T10:58:39Z")

</div>

Hi,

I just started working with [docker elk](https://github.com/deviantony/docker-elk) and also have filebeat for some docker containers up and running (almost). One of my docker container (JIRA) is creating multiline output (mainly java exceptions / stack traces) and thanks to the excellent [filebeat documentation](https://www.elastic.co/guide/en/beats/filebeat/master/_examples_of_multiline_configuration.html) I was able to fetch java stack traces as a single log entry.

I simply took this multiline configuration from the docs:

```
multiline.pattern: '^[[:space:]]+(at|\.{3})\b|^Caused by:'
multiline.negate: false
multiline.match: after

```

But sometimes I have exception like this one:

```
java.lang.IllegalArgumentException: Cannot find Screen with id '13300'.
    at com.atlassian.jira.workflow.WorkflowActionsBean.getFieldScreenForView(WorkflowActionsBean.java:57)
    at com.atlassian.jira.workflow.AbstractJiraWorkflow.loadFieldScreenActions(AbstractJiraWorkflow.java:416)
    at com.atlassian.jira.workflow.AbstractJiraWorkflow.getActionsForScreen(AbstractJiraWorkflow.java:403)
    at com.atlassian.jira.web.action.admin.issuefields.screens.ViewFieldScreens.getWorkflowTransitionViews(ViewFieldScreens.java:139)
    at sun.reflect.GeneratedMethodAccessor1513.invoke(Unknown Source)
    ... 1 filtered
    at java.lang.reflect.Method.invoke(Method.java:498)
    at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
    at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
    at webwork.util.ValueStack.findValue(ValueStack.java:517)
    at webwork.util.ValueStack.findValue(ValueStack.java:216)
    at webwork.view.taglib.WebWorkBodyTagSupport.findValue(WebWorkBodyTagSupport.java:62)
    at webwork.view.taglib.BasicPropertyTag.doStartTag(BasicPropertyTag.java:54)
    at jsp.secure.admin.views.issuefields.screens.viewfieldscreens_jsp._jspx_meth_ww_005fproperty_005f5(viewfieldscreens_jsp.java:1327)

```

And from the beginning of the line

```
... 1 filtered

```

a new event will be discovered ☹ - somehow the multiline.pattern is not fetching it correctly even though the docs say:

```
a line that begins with spaces followed by the word `at` or `...`

```

Any idea pointing me in the right direction would very much appreciated!

Best Regards,

Christian

---

<div class="post-metadata">

**Author:** ![cschlaefcke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cschlaefcke/32/35615_2.png) [@cschlaefcke](https://discuss.elastic.co/u/cschlaefcke)\
**Post date:** [September 19, 2018, 12:37pm UTC](https://discuss.elastic.co/t/multiline-configuration-java-stack-trace/149107/2 "2018-09-19T12:37:36Z")

</div>

After I found [the hint for testing my pattern first](https://www.elastic.co/guide/en/beats/filebeat/current/_test_your_regexp_pattern_for_multiline.html) it is at least obvious that the current pattern is not matching the line with dots:

 ![05](https://us1.discourse-cdn.com/elastic/original/3X/4/6/461b5739c53c067ce03b3317375034e7bdc605f3.png)

---

<div class="post-metadata">

**Author:** ![cschlaefcke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cschlaefcke/32/35615_2.png) [@cschlaefcke](https://discuss.elastic.co/u/cschlaefcke)\
**Post date:** [September 19, 2018, 1:01pm UTC](https://discuss.elastic.co/t/multiline-configuration-java-stack-trace/149107/3 "2018-09-19T13:01:29Z")

</div>

Okay now - I´ve played around a bit with the pattern and it seems that the word boundary switch (\b) is causing problems. Even though I am not sure what exactly it was intended for - changing the pattern from:

```
multiline.pattern: '^[[:space:]]+(at|\.{3})\b|^Caused by:'

```

to

```
multiline.pattern: '^[[:space:]]+(at|\.{3})|^Caused by:'

```

makes my filebeat configuration work like desired 👍

---

<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:** [October 17, 2018, 1:01pm UTC](https://discuss.elastic.co/t/multiline-configuration-java-stack-trace/149107/4 "2018-10-17T13:01:31Z")

</div>

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