I am using the following translate filters in my logstash configuration file. I have two separate YAML files that serve as the lookup dictionaries. The logstash event field
referenced is the same for both filters but their destination
fields are different. When I execute this, the destination
field from the first translate filter is populated correctly, but the destination
filter of the second translate filter fails to populate. How do I ensure that the destination
of the second field is also populated correctly using these multiple translate filters?
translate {
dictionary_path => "C:/elk/lookupFile_1.yaml"
field => "eventField_1"
destination => "destField_1"
}
translate {
dictionary_path => "C:/elk/lookupFile_2.yaml"
field => "eventField_1"
destination => "destField_2"
}
Two alternatives I think would be possible -
a) Instead of two YAML files, using just one YAML file where the value
field is an array eg key1 : val1a ,val1b
. Then using the dissect filter to maybe separate the destination field into separate fields.
b) Create a duplicate of eventField_1
, say eventField_1Copy
, and pass that to the field parameter of the second translate filter. I can then drop eventField_1Copy