# Filebeat 5.0.0-alpha3 not parsing the JSON messages, it shows up as a string

**URL:** https://discuss.elastic.co/t/filebeat-5-0-0-alpha3-not-parsing-the-json-messages-it-shows-up-as-a-string/53679
**Category:** Beats
**Tags:** filebeat
**Created:** [June 22, 2016, 3:45pm UTC](https://discuss.elastic.co/t/filebeat-5-0-0-alpha3-not-parsing-the-json-messages-it-shows-up-as-a-string/53679 "2016-06-22T15:45:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![keya](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@keya](https://discuss.elastic.co/u/keya)
#### Post date: [June 22, 2016, 3:45pm UTC](https://discuss.elastic.co/t/filebeat-5-0-0-alpha3-not-parsing-the-json-messages-it-shows-up-as-a-string/53679/1 "2016-06-22T15:45:36Z")

</div>

Hi,  
I am sending logs from Filebeat to Elasticsearch directly. My logs are in JSON format and some have nested JSON objects too. I am using Filebeat 5.0.0-alpha3 version for parsing the log files, but I still see the JSON messages as a string on Kibana:  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/4/42b656bc209a4f4d9204bf94a05bfeb1cdf44f37.PNG)

I want the message to be shown as message.message "".

How can I get this working?

My filebeat.yml is as below:

```auto
filebeat:
 prospectors:

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

 -
  input_type: log

  # Paths that should be crawled and fetched. Glob based paths.
  paths:
    - /home/resources/sample2.log
    # - /home/MXFiles/facade/logs/debug.log
    #- c:\programdata\elasticsearch\logs\*

  # Exclude lines. A list of regular expressions to match. It drops the lines that are
  # matching any regular expression from the list.
  #exclude_lines: ["^DBG"]

  # Include lines. A list of regular expressions to match. It exports the lines that are
  # matching any regular expression from the list.
  #include_lines: ["^ERR", "^WARN"]

  # Exclude files. A list of regular expressions to match. Filebeat drops the files that
  # are matching any regular expression from the list. By default, no files are dropped.
  #exclude_files: [".gz$"]

  # Optional additional fields. These field can be freely picked
  # to add additional information to the crawled log files for filtering
  #fields:
  # level: debug
  # review: 1

  ### Multiline options

  # Mutiline can be used for log messages spanning multiple lines. This is common
  # for Java Stack Traces or C-Line Continuation

  # The regexp Pattern that has to be matched. The example pattern matches all lines starting with [
  # multiline.pattern: ^\{

  # Defines if the pattern set under pattern should be negated or not. Default is false.
  #multiline.negate: true

  # Match can be set to "after" or "before". It is used to define if lines should be append to a pattern
  # that was (not) matched before or after or as long as a pattern is not matched based on negate.
  # Note: After is the equivalent to previous and before is the equivalent to to next in Logstash
  #multiline.match: after
  json:
        message_key: log
        keys_under_root: true
        overwrite_keys: true

```

---

<div class="post-metadata">

### Author: ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)
#### Post date: [June 23, 2016, 1:19pm UTC](https://discuss.elastic.co/t/filebeat-5-0-0-alpha3-not-parsing-the-json-messages-it-shows-up-as-a-string/53679/2 "2016-06-23T13:19:47Z")

</div>

Can you share some example log lines?

---

<div class="post-metadata">

### Author: ![keya](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@keya](https://discuss.elastic.co/u/keya)
#### Post date: [June 23, 2016, 1:51pm UTC](https://discuss.elastic.co/t/filebeat-5-0-0-alpha3-not-parsing-the-json-messages-it-shows-up-as-a-string/53679/3 "2016-06-23T13:51:31Z")

</div>

Here is a sample log from the file:

`{"time": "2016-06-22T09:06:41.120Z", "level": "INFO", "category": "sample.js", "hostname": "xxx", "message": {"message":"[*] Waiting for messages in agentUpdates."}}`

---

<div class="post-metadata">

### Author: ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)
#### Post date: [June 28, 2016, 10:15am UTC](https://discuss.elastic.co/t/filebeat-5-0-0-alpha3-not-parsing-the-json-messages-it-shows-up-as-a-string/53679/4 "2016-06-28T10:15:05Z")

</div>

It looks like your message is actually under `message.message` and not `log`. @tudor Is it possible to have nested fields for the message key?

---

<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 13, 2016, 3:45pm UTC](https://discuss.elastic.co/t/filebeat-5-0-0-alpha3-not-parsing-the-json-messages-it-shows-up-as-a-string/53679/5 "2016-07-13T15:45:38Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
