logstash-plugins / logstash-filter-translate

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

[BUG] value is written to "translation" #53

Closed abraxxa closed 6 years ago

abraxxa commented 6 years ago

expected output:

{
    "action": "Deny"
}

The problem is with the docs, the "Description" section states:

Operationally, if the event field specified in the field configuration matches the EXACT contents of a dictionary entry key (or matches a regex if regex configuration item has been enabled), the field’s value will be substituted with the matched key’s value from the dictionary.

By default, the translate filter will replace the contents of the maching event field (in-place).

But the destination config option has a default value of "translation" leading to what's happening. I've expected the "Description" section to be correct to overwrite the field as unsetting the "destination" config option isn't documented. Is it "destination" => null or undef or the same value as field? Maybe it isn't possible at all.

guyboertje commented 6 years ago

This is a weird doc bug. It has been this way for at least 4 years. The field field was never updated.

Will fix in next update.