# Pretty JSON format of recieved (dot separated) log data fields

**URL:** https://discuss.elastic.co/t/pretty-json-format-of-recieved-dot-separated-log-data-fields/217796
**Category:** Kibana
**Created:** [February 4, 2020, 12:14pm UTC](https://discuss.elastic.co/t/pretty-json-format-of-recieved-dot-separated-log-data-fields/217796 "2020-02-04T12:14:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Roman\_Konkol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roman_konkol/32/50393_2.png) [@Roman\_Konkol](https://discuss.elastic.co/u/Roman_Konkol)
#### Post date: [February 4, 2020, 12:14pm UTC](https://discuss.elastic.co/t/pretty-json-format-of-recieved-dot-separated-log-data-fields/217796/1 "2020-02-04T12:14:50Z")

</div>

Hi all,  
can you help me, please? I want to see my whole log entries in pretty JSON format on Kibana Discovery page.

What I received from logstash:

- log entries with "dot case format" fields like: http.host, http.body, http.headers

What I can see now - log entry in Expanded document - JSON view on Discovery page:

- pretty printed agent (id, type, version....), host (id, name, os.name....), log (file.path, flags, offset) and other fields
- not pretty printed http and other custom fields  
 ![obrazek](https://us1.discourse-cdn.com/elastic/original/3X/7/9/79e751d78a4ca23aa878491746d8b02b07424bed.png)

What I want to see:

- pretty structured JSON showing all http information together like agent.version, agent.id, agent.type, agent.hostname and other dot separated "default" kibana fields.  
Example of pretty printed JSON:

Why Kibana shows log, agent and other fields differently than my http fields (or fields separated from log message)? What can I do for pretty JSON view of my fields?

We are using last stable Kibana, Logstash, Filebeat versions (Kibana 7.5.2 - new installation and configuration without plugins)  
Thanks a lot, best regards  
RK

---

<div class="post-metadata">

### Author: ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)
#### Post date: [February 4, 2020, 7:20pm UTC](https://discuss.elastic.co/t/pretty-json-format-of-recieved-dot-separated-log-data-fields/217796/2 "2020-02-04T19:20:38Z")

</div>

Hi @Roman_Konkol. Can you share the mapping for your index? I wonder if the `http` mapping is missing or incorrect?

---

<div class="post-metadata">

### Author: ![Roman\_Konkol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roman_konkol/32/50393_2.png) [@Roman\_Konkol](https://discuss.elastic.co/u/Roman_Konkol)
#### Post date: [February 4, 2020, 8:47pm UTC](https://discuss.elastic.co/t/pretty-json-format-of-recieved-dot-separated-log-data-fields/217796/3 "2020-02-04T20:47:49Z")

</div>

I hope that I found correct mapping. (GET /filebeat-7.5.1-2020.02.04/\_mapping or Management - Index management - filebeat index and Mapping in the detail screen)

```
"http": {
        "properties": {
          "body": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "code": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "headers": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "host": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "method": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "path": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "query": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          }
        }
      },
```

---

<div class="post-metadata">

### Author: ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)
#### Post date: [February 4, 2020, 10:06pm UTC](https://discuss.elastic.co/t/pretty-json-format-of-recieved-dot-separated-log-data-fields/217796/4 "2020-02-04T22:06:43Z")

</div>

Thanks. Unfortunately, I'm not able to recreate the issue on v7.5.2. Because I am seeing properly nested JSON in Discover under my `http` object [1]. But I may be using a different module (nginx) than you, so maybe that's why my mapping [2] is different than yours.

Are you connecting Filebeat directly to Elasticsearch or through Logstash?

[1] Snippet from Discover

```auto
"http": {
      "request": {
        "referrer": "https://kibana-proxy.local/tfg/login?next=%2Ftfg%2F",
        "method": "GET"
      },
      "response": {
        "status_code": 200,
        "body": {
          "bytes": 6371
        }
      },
      "version": "1.1"
    },

```

[2] My mapping:

```auto
"http": {
        "properties": {
          "request": {
            "properties": {
              "body": {
                "properties": {
                  "bytes": {
                    "type": "long"
                  },
                  "content": {
                    "type": "keyword",
                    "ignore_above": 1024
                  }
                }
              },
              "bytes": {
                "type": "long"
              },
              "method": {
                "type": "keyword",
                "ignore_above": 1024
              },
              "referrer": {
                "type": "keyword",
                "ignore_above": 1024
              }
            }
          },
          "response": {
            "properties": {
              "body": {
                "properties": {
                  "bytes": {
                    "type": "long"
                  },
                  "content": {
                    "type": "keyword",
                    "ignore_above": 1024
                  }
                }
              },
              "bytes": {
                "type": "long"
              },
              "status_code": {
                "type": "long"
              }
            }
          },
          "version": {
            "type": "keyword",
            "ignore_above": 1024
          }
        }
      }

```

---

<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: [March 3, 2020, 10:06pm UTC](https://discuss.elastic.co/t/pretty-json-format-of-recieved-dot-separated-log-data-fields/217796/5 "2020-03-03T22:06:48Z")

</div>

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