logstash-plugins / logstash-filter-translate

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

Deleted value in dynamic config don't fallback #54

Closed amaury-d closed 6 years ago

amaury-d commented 6 years ago
  1. Start logstash
  2. Inject msg with application=foo, it translates to application=bar, no problem here
  3. Then delete the line foo:bar from config
  4. After dynamic refresh, application=foo keeps being translated to application=bar instead of fallback to application=log
guyboertje commented 6 years ago

This behaviour is has been the default since 10 Sep 2014. The dictionary is merged on reload so keys and values deleted on file will not be removed from the in-memory dictionary.

I suggest that, instead of deleting, you change the value to deleted-translation and then add a conditional block that replaces that value with your fallback.

amaury-d commented 5 years ago

For information, commit e33dc0a7c156d85ffde43174210dfaae1d5f19c5 added the option 'refresh_behaviour'