logstash-plugins / logstash-filter-translate

Translate filter for Logstash
Apache License 2.0
21 stars 47 forks source link

Translation does not work if source and dest field is the same #55

Closed vbohata closed 6 years ago

vbohata commented 6 years ago

According to documentation setting the same source and dest field should lead to "in-place" replacements. Instead of it, translate do not work (do not translate). translate { exact => false field => "severity" destination => "severity" dictionary => { "DBG" => "DEBUG" "INF" => "INFO" "ERR" => "ERROR" } }

If destination is other field, translation work. For example the values here are translated to severitydest: translate { exact => false field => "severity" destination => "severitydest" dictionary => { "DBG" => "DEBUG" "INF" => "INFO" "ERR" => "ERROR" } }

guyboertje commented 6 years ago

@vbohata Please give the text in the severity field of a sample event.

guyboertje commented 6 years ago

It does work if you set "override" => true. I will update the docs.

Closing.

branchnetconsulting commented 5 years ago

I would recommend you mention about the need to use the override option where the idea of overwriting the same field is first brought up in the documentation, here:

https://www.elastic.co/guide/en/logstash/current/plugins-filters-translate.html#plugins-filters-translate-destination

Kevin