logstash-filter-translate
logstash-filter-translate copied to clipboard
Feature Request: Translate Multiple Fields
Condensation of field and destination configuration options to a single configuration option as a hash, allowing multiple lookups and writes to separate fields where all other config options are the same.
Edit: This would not only reduce the complexity of the pipeline but also reduce the number of dictionary files that would need to be maintained by allowing merging of multiple smaller dictionary files with disparate terms.
For example, if I have three separate fields that contain the same value types to translate, I have to write out:
translate {
id => "Field1 Translate"
dictionary_path => "/dictionaries/codes.yaml"
field => "Field1"
destination => "Field1Translate"
refresh_behaviour => "replace"
}
translate {
id => "Field2 Translate"
dictionary_path => "/dictionaries/codes.yaml"
field => "Field2"
destination => "Field2Translate"
refresh_behaviour => "replace"
}
translate {
id => "Field3 Translate"
dictionary_path => "/dictionaries/codes.yaml"
field => "Field3"
destination => "Field3Translate"
refresh_behaviour => "replace"
}
By converting the two options into a single hash type, it can be condensed down and would look like the following:
translate {
id => "Field Translate"
dictionary_path => "/dictionaries/codes.yaml"
translate => {
"Field1", "Field1Translate",
"Field2", "Field2Translate",
"Field3", "Field3Translate"
}
refresh_behaviour => "replace"
}