# Mapping a Data in a log to another Field

**URL:** <https://discuss.elastic.co/t/mapping-a-data-in-a-log-to-another-field/270250>\
**Category:** Logstash\
**Created:** [April 15, 2021, 2:22pm UTC](https://discuss.elastic.co/t/mapping-a-data-in-a-log-to-another-field/270250 "2021-04-15T14:22:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wilks](https://avatars.discourse-cdn.com/v4/letter/w/f475e1/32.png) [@Wilks](https://discuss.elastic.co/u/Wilks)\
**Post date:** [April 15, 2021, 2:22pm UTC](https://discuss.elastic.co/t/mapping-a-data-in-a-log-to-another-field/270250/1 "2021-04-15T14:22:04Z")

</div>

Hey Everyone,  
How do you map a field from the logs to another field. So for example if I have the following log  
message":"03-MAR-21 00:30:46|142.122.217.10 | **1** | I want to parse out |1| but also then map it to an index that says **Authentication failed**. So for example:  
|1| would be Auth failed  
|2| would be auth passed.  
|3| would be logout

We have the numbers in the logs but I want to have it show up as a more user friendly field. So we don't have to lookup what |1| means, we would know that it means Auth Failed  
What's the best way to do this?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [April 15, 2021, 2:54pm UTC](https://discuss.elastic.co/t/mapping-a-data-in-a-log-to-another-field/270250/2 "2021-04-15T14:54:10Z")

</div>

Use a translate filter.

---

<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:** [May 13, 2021, 2:54pm UTC](https://discuss.elastic.co/t/mapping-a-data-in-a-log-to-another-field/270250/3 "2021-05-13T14:54:50Z")

</div>

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