# Parse the logs

**URL:** https://discuss.elastic.co/t/parse-the-logs/125276
**Category:** Elasticsearch
**Created:** [March 22, 2018, 10:06pm UTC](https://discuss.elastic.co/t/parse-the-logs/125276 "2018-03-22T22:06:11Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![kanthimathi](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@kanthimathi](https://discuss.elastic.co/u/kanthimathi)
#### Post date: [March 22, 2018, 10:06pm UTC](https://discuss.elastic.co/t/parse-the-logs/125276/1 "2018-03-22T22:06:12Z")

</div>

Hi all,

Currently, we are using filebeat to get the logs from kubernetes. But we would like to parse the logs for better usage. Is there any possibility to do that?

Note: The message is too log and using filter did not work as expected. This is because the message contained repeated words in the same log and we could not get the expected result.

Thanks,  
Kanthi.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [March 22, 2018, 10:14pm UTC](https://discuss.elastic.co/t/parse-the-logs/125276/2 "2018-03-22T22:14:53Z")

</div>

Which logs exactly?

---

<div class="post-metadata">

### Author: ![kanthimathi](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@kanthimathi](https://discuss.elastic.co/u/kanthimathi)
#### Post date: [March 22, 2018, 10:45pm UTC](https://discuss.elastic.co/t/parse-the-logs/125276/3 "2018-03-22T22:45:18Z")

</div>

If I want to filter this kind of logs. I have a bunch of logs and want to drill it down further but since they are together in message field I cannot do that.

For an instance, if my message is like  
`HTTP/1.1" 200 33 "https:// *****" and Chrome/200.0.3325.181 Safari/537.36"`

I cannot filter the logs with 200 as the message contains 200 twice. The solution for this will be to parse the logs or separate into different fields.

Is this possible?

Thanks,  
Kanthi.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [March 22, 2018, 10:46pm UTC](https://discuss.elastic.co/t/parse-the-logs/125276/4 "2018-03-22T22:46:02Z")

</div>

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them.

However, have you looked at Logstash for this?

---

<div class="post-metadata">

### Author: ![kanthimathi](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@kanthimathi](https://discuss.elastic.co/u/kanthimathi)
#### Post date: [March 22, 2018, 10:50pm UTC](https://discuss.elastic.co/t/parse-the-logs/125276/5 "2018-03-22T22:50:02Z")

</div>

@warkolm sorry and thanks for the tip.

I haven't checked that as we are using filebeat and metricbeat already. Logstash have that feature?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [March 22, 2018, 10:50pm UTC](https://discuss.elastic.co/t/parse-the-logs/125276/6 "2018-03-22T22:50:38Z")

</div>

Logstash is made for parsing data that filebeat ships, so yep.

---

<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: [April 19, 2018, 10:50pm UTC](https://discuss.elastic.co/t/parse-the-logs/125276/7 "2018-04-19T22:50:52Z")

</div>

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