# Message contains full log line

**URL:** https://discuss.elastic.co/t/message-contains-full-log-line/146692
**Category:** Logstash
**Created:** [August 30, 2018, 11:37am UTC](https://discuss.elastic.co/t/message-contains-full-log-line/146692 "2018-08-30T11:37:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ico\_Re](https://avatars.discourse-cdn.com/v4/letter/i/7ab992/32.png) [@Ico\_Re](https://discuss.elastic.co/u/Ico_Re)
#### Post date: [August 30, 2018, 11:37am UTC](https://discuss.elastic.co/t/message-contains-full-log-line/146692/1 "2018-08-30T11:37:07Z")

</div>

Hi  
I have the following filter defined in the logstash.conf

```
filter {
    grok {
          match => { "message" => "%{TIMESTAMP_ISO8601:timestamp} (?<thread>\[.*\])? %{LOGLEVEL:level} %{DATA:classname} %{GREEDYDATA:message}" }
    }
}

```

And this works fine, it match the log I have (Java app). Now, when i go to Kibana, all fields defined here (timestamp, thread, level, classname) are shown correctly. The problem is message field. Basically it is shown the full line from the log, for example:

```
2018-08-30 12:34:58,591 [cluster-nio-worker-0] TRACE c.c.d.c.ClassName Some message here

```

I think this is because of the first part in match: `"message" => ...`  
I also tried to change "message" to "msg" but then it doesn't work.

How can I have only the message (last part of the log)?

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [August 30, 2018, 11:56am UTC](https://discuss.elastic.co/t/message-contains-full-log-line/146692/2 "2018-08-30T11:56:59Z")

</div>

Add `overwrite => ["message"]` in your grok filter.

---

<div class="post-metadata">

### Author: ![Ico\_Re](https://avatars.discourse-cdn.com/v4/letter/i/7ab992/32.png) [@Ico\_Re](https://discuss.elastic.co/u/Ico_Re)
#### Post date: [August 31, 2018, 8:42am UTC](https://discuss.elastic.co/t/message-contains-full-log-line/146692/3 "2018-08-31T08:42:05Z")

</div>

Thanks. It works like a charm 🙂

---

<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 28, 2018, 8:42am UTC](https://discuss.elastic.co/t/message-contains-full-log-line/146692/4 "2018-09-28T08:42:06Z")

</div>

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