logstash-plugins / logstash-filter-translate

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

Variables are not resolved using dictionary key-value mappings #80

Open mariusoe opened 5 years ago

mariusoe commented 5 years ago

I have the problem that when I'm using variables inside a value of the dictionary property, that these will not be resolved. Variables will only be resolved in the "fallback" case.

Example:

translate {
    ...
    dictionary => {
        "myKey" => "value-%{+YYYY.MM}"
    }
    fallback => "fallback-%{+YYYY.MM}"
}

The configuration above, is producing the following output in case the dictionary element is matching: value-%{+YYYY.MM} - so the date format is not resolved. In the fallback scenario, the output would be fallback-2018.11 (as an example) which I expected to be.

It would be great if the key-value elements (the values like in the example above) would also resolve variables like in the fallback case.