# Filebeat-5.5.1 got decoding JSON with a simple json line string

**URL:** <https://discuss.elastic.co/t/filebeat-5-5-1-got-decoding-json-with-a-simple-json-line-string/96555>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 10, 2017, 6:13am UTC](https://discuss.elastic.co/t/filebeat-5-5-1-got-decoding-json-with-a-simple-json-line-string/96555 "2017-08-10T06:13:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_ax](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@John\_ax](https://discuss.elastic.co/u/John_ax)\
**Post date:** [August 10, 2017, 6:13am UTC](https://discuss.elastic.co/t/filebeat-5-5-1-got-decoding-json-with-a-simple-json-line-string/96555/1 "2017-08-10T06:13:57Z")

</div>

filebeat-5.5.1 got decoding JSON with a simple json line string:

```json
echo {"id":"l7KVoUhkRWWESd9QE_DX5Q", "timestamp":1502334971,"logtype":"event", "file":"tset.cpp", "function":"ProcMessageNew", "line":271} >> test.log 

```

filebeat is monitoring the test file:

```auto
- input_type: log
  paths:
    - /root/test.log

```

also I try the newest version filebeat, got the same issue. @steffens

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [August 10, 2017, 2:29pm UTC](https://discuss.elastic.co/t/filebeat-5-5-1-got-decoding-json-with-a-simple-json-line-string/96555/2 "2017-08-10T14:29:27Z")

</div>

You have to [explicitly enable json parsing](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-filebeat-options.html#config-json). The way you use the echo command, without additional escaping I'm not sure a valid json line will be written to your log.

---

<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 7, 2017, 2:29pm UTC](https://discuss.elastic.co/t/filebeat-5-5-1-got-decoding-json-with-a-simple-json-line-string/96555/3 "2017-09-07T14:29:48Z")

</div>

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