# Ingest Pipeline, set field derived from another

**URL:** https://discuss.elastic.co/t/ingest-pipeline-set-field-derived-from-another/265195
**Category:** Elasticsearch
**Created:** [February 23, 2021, 11:19am UTC](https://discuss.elastic.co/t/ingest-pipeline-set-field-derived-from-another/265195 "2021-02-23T11:19:27Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nberens](https://avatars.discourse-cdn.com/v4/letter/n/ed8c4c/32.png) [@nberens](https://discuss.elastic.co/u/nberens)
#### Post date: [February 23, 2021, 11:19am UTC](https://discuss.elastic.co/t/ingest-pipeline-set-field-derived-from-another/265195/1 "2021-02-23T11:19:27Z")

</div>

Hello,

i am currently building a new pipeline for filebeat where we ingest a lot of different logfiles, e.g.

- /log/appname1.log
- /log/appname2.log
- etc

now i want a field in every document that says:

- app: appname1

So, is it possible to parse an existing field (log.file.path: /log/appname1.log) with an regex and use the result in a new field?

---

<div class="post-metadata">

### Author: ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)
#### Post date: [February 23, 2021, 11:33am UTC](https://discuss.elastic.co/t/ingest-pipeline-set-field-derived-from-another/265195/2 "2021-02-23T11:33:41Z")

</div>

Hi,

You can use the grok processor for that: [Grok processor | Elasticsearch Reference [7.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html#custom-patterns)

You can use the Kibana grok debugger(available under Dev Tools) to test your pattern.

Best regards  
Wolfram

---

<div class="post-metadata">

### Author: ![nberens](https://avatars.discourse-cdn.com/v4/letter/n/ed8c4c/32.png) [@nberens](https://discuss.elastic.co/u/nberens)
#### Post date: [February 23, 2021, 12:25pm UTC](https://discuss.elastic.co/t/ingest-pipeline-set-field-derived-from-another/265195/3 "2021-02-23T12:25:14Z")

</div>

great, it works quite well for me

Thanks!

---

<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 23, 2021, 12:25pm UTC](https://discuss.elastic.co/t/ingest-pipeline-set-field-derived-from-another/265195/4 "2021-03-23T12:25:22Z")

</div>

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