# Logstash Pipeline Translate Filter

**URL:** <https://discuss.elastic.co/t/logstash-pipeline-translate-filter/202184>\
**Category:** Logstash\
**Created:** [October 3, 2019, 1:55pm UTC](https://discuss.elastic.co/t/logstash-pipeline-translate-filter/202184 "2019-10-03T13:55:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fim/32/90645_2.png) [@fim](https://discuss.elastic.co/u/fim)\
**Post date:** [October 3, 2019, 1:55pm UTC](https://discuss.elastic.co/t/logstash-pipeline-translate-filter/202184/1 "2019-10-03T13:55:00Z")

</div>

May somebody help me to solve the following problem?

My index gets written into elasticsearch but the field host.name is not changed according the predefined dictionary.

Data gets ingested from a metricbeat v7.3.

```
input {
    pipeline { address => "metricbeat-ais" }
}

filter {
	translate {
		field => "host.name"
		destination => "host.name"
        override => "true"
        dictionary => {
            "host-001" => "COM"
            "host-002" => "AMS"
		    "host-003" => "WEB"
            "host-004" => "SQL"
        }
	}
}

output {
    ...
    }
}
```

---

<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:** [October 3, 2019, 2:11pm UTC](https://discuss.elastic.co/t/logstash-pipeline-translate-filter/202184/2 "2019-10-03T14:11:09Z")

</div>

Are you sure it has a period in the field name, or is it a nested field that you would refer to as [host][name] in logstash?

---

<div class="post-metadata">

**Author:** ![Kartik\_Kolachina](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@Kartik\_Kolachina](https://discuss.elastic.co/u/Kartik_Kolachina)\
**Post date:** [October 3, 2019, 3:01pm UTC](https://discuss.elastic.co/t/logstash-pipeline-translate-filter/202184/3 "2019-10-03T15:01:05Z")

</div>

Can you try,  
field =\> "host[name]"

---

<div class="post-metadata">

**Author:** ![Yatesss](https://avatars.discourse-cdn.com/v4/letter/y/46a35a/32.png) [@Yatesss](https://discuss.elastic.co/u/Yatesss)\
**Post date:** [October 3, 2019, 3:05pm UTC](https://discuss.elastic.co/t/logstash-pipeline-translate-filter/202184/4 "2019-10-03T15:05:41Z")

</div>

field =\> "[host][name]"  
destination =\> "host.name"

---

<div class="post-metadata">

**Author:** ![fim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fim/32/90645_2.png) [@fim](https://discuss.elastic.co/u/fim)\
**Post date:** [October 4, 2019, 8:58am UTC](https://discuss.elastic.co/t/logstash-pipeline-translate-filter/202184/5 "2019-10-04T08:58:45Z")

</div>

I rely on ECS.  
Your feedback solved my problem:

```
field => "[host][name]"
destination => "[host][name]"

```

Thanks Badger!

---

<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:** [November 1, 2019, 8:58am UTC](https://discuss.elastic.co/t/logstash-pipeline-translate-filter/202184/6 "2019-11-01T08:58:45Z")

</div>

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