Hi all,
We have a use-case to populate dictionary path dynamically for the Logstash translate plugin. We have lookup files for each location and are ingesting data from more than 30 locations. So, we would like to auto-populate the dictionary_path field based on the origin [in our case location field]. The sample code I tried is the following:
translate {
field => "SG_ID"
dictionary_path => "/etc/logstash/resources/%{[LOCATION]}_sgid_hub_mapping.csv"
destination => "HUB"
}
When I try to use the aforementioned code, Logstash complains.
[ERROR][logstash.filters.translate] Invalid setting for translate filter plugin:
The only alternative I can think of is writing a long parsing config by defining translate plugin code section for each of the 30 locations - which I am not inclined towards.
Any recommendation/suggestion in this regard will be of great help.
Thanks.