# Creating custom fields and populating them from log data

**URL:** <https://discuss.elastic.co/t/creating-custom-fields-and-populating-them-from-log-data/75105>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [February 14, 2017, 8:08pm UTC](https://discuss.elastic.co/t/creating-custom-fields-and-populating-them-from-log-data/75105 "2017-02-14T20:08:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam281](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@sam281](https://discuss.elastic.co/u/sam281)\
**Post date:** [February 14, 2017, 8:08pm UTC](https://discuss.elastic.co/t/creating-custom-fields-and-populating-them-from-log-data/75105/1 "2017-02-14T20:08:07Z")

</div>

HI,  
Can somebody help me in creating and populating the custom fields from log data which is being ingested in to ES using file beats?  
I have gone through some of the documentation which discusses about Fields and Fields\_under\_root at [https://www.elastic.co/guide/en/beats/filebeat/1.2/configuration-filebeat-options.html](https://www.elastic.co/guide/en/beats/filebeat/1.2/configuration-filebeat-options.html), This doesn’t show any example for extracting the data from log record to certain fields.

Kindly point me to an example with a regex pattern syntax. Thanks.

- 

Sam

---

<div class="post-metadata">

**Author:** ![tudor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tudor/32/3753_2.png) [@tudor](https://discuss.elastic.co/u/tudor)\
**Post date:** [February 15, 2017, 11:21am UTC](https://discuss.elastic.co/t/creating-custom-fields-and-populating-them-from-log-data/75105/2 "2017-02-15T11:21:20Z")

</div>

Filebeat doesn't support actually parsing the log files, because it's just a log shipper. I recommend using Logstash for that, see the Grok plugin.

---

<div class="post-metadata">

**Author:** ![sam281](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@sam281](https://discuss.elastic.co/u/sam281)\
**Post date:** [February 15, 2017, 11:41am UTC](https://discuss.elastic.co/t/creating-custom-fields-and-populating-them-from-log-data/75105/3 "2017-02-15T11:41:46Z")

</div>

Thank you!

Can you share some reference document with some examples please for custom fields creation in Logstash and grok patterns?

Thanks again.

Sam

---

<div class="post-metadata">

**Author:** ![sam281](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@sam281](https://discuss.elastic.co/u/sam281)\
**Post date:** [February 15, 2017, 12:38pm UTC](https://discuss.elastic.co/t/creating-custom-fields-and-populating-them-from-log-data/75105/4 "2017-02-15T12:38:52Z")

</div>

One more question, can we use Filebeats for sending data to Logstash and parse the log there? Thanks.

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [February 15, 2017, 8:59pm UTC](https://discuss.elastic.co/t/creating-custom-fields-and-populating-them-from-log-data/75105/5 "2017-02-15T20:59:21Z")

</div>

> [@sam281](#):
>
> One more question, can we use Filebeats for sending data to Logstash and parse the log there?

Yes, that is one way it can be used. Checkout the [Getting Started guide](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-getting-started.html).

Once you have the data going to Logstash you would add a grok filter: See docs at [Grok filter plugin | Logstash Reference [8.11] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html)

---

<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 15, 2017, 8:59pm UTC](https://discuss.elastic.co/t/creating-custom-fields-and-populating-them-from-log-data/75105/6 "2017-03-15T20:59:31Z")

</div>

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