# Multiline stacktrace in JSON not parsed by Filebeat/seen in Kibana

**URL:** <https://discuss.elastic.co/t/multiline-stacktrace-in-json-not-parsed-by-filebeat-seen-in-kibana/275502>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 9, 2021, 9:40pm UTC](https://discuss.elastic.co/t/multiline-stacktrace-in-json-not-parsed-by-filebeat-seen-in-kibana/275502 "2021-06-09T21:40:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcklie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jcklie/32/90100_2.png) [@jcklie](https://discuss.elastic.co/u/jcklie)\
**Post date:** [June 9, 2021, 9:40pm UTC](https://discuss.elastic.co/t/multiline-stacktrace-in-json-not-parsed-by-filebeat-seen-in-kibana/275502/1 "2021-06-09T21:40:08Z")

</div>

I use [JSON Template Layout from Apache log4j](https://logging.apache.org/log4j/2.x/manual/json-template-layout.html) to log to jsonl. Then I use Filebeat to ingest this:

```auto
filebeat.inputs:

- type: log
  enabled: true
  paths:
    - /srv/inception-stable/logs/inception-stable.log
    - /srv/inception-community/logs/inception-community.log
    - /srv/inception-testing/logs/inception-testing.log
    - /srv/inception-experimental/logs/inception-experimental.log
  json.keys_under_root: true
  json.add_error_key: true

  processors:
    - copy_fields:
        fields:
          - from: "log.file.path"
            to: "inception-instance"
        fail_on_error: false
        ignore_missing: true

setup.template.settings:
  index.number_of_shards: 1
  setup.template.enabled: true
  setup.template.overwrite: true

output.elasticsearch:
  hosts: ["localhost:9200"]

setup.kibana:
  host: "localhost:5601"

processors:
  - add_host_metadata:
      when.not.contains.tags: forwarded
  - add_cloud_metadata: ~
  - add_docker_metadata: ~
  - add_kubernetes_metadata: ~

```

It shows up in Kibana, except for the `exception.stacktrace` field. I think it does not show up when it is too long, as for shorter stacktraces I can see it. Is there a limit or something on json decoding in Filebeat?

[One Json entry](https://pastebin.com/LFMhPq0q)  
[Corresponding Kibana entry](https://pastebin.com/y0pB0Vxu)

---

<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:** [June 9, 2021, 9:44pm UTC](https://discuss.elastic.co/t/multiline-stacktrace-in-json-not-parsed-by-filebeat-seen-in-kibana/275502/2 "2021-06-09T21:44:37Z")

</div>

Given that you are sending data directly from filebeat to elasticsearch without using logstash you might want to move this to the filebeat forum.

---

<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 7, 2021, 9:45pm UTC](https://discuss.elastic.co/t/multiline-stacktrace-in-json-not-parsed-by-filebeat-seen-in-kibana/275502/3 "2021-07-07T21:45:22Z")

</div>

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