Hi,
I am creating a csv file which I want to use as a dictionary inside translate plugin.
Since the mapping might change the next day, I named my csv file this way:
my-mapping-YYYY-MM-dd
.csv
where YYYY, MM, dd are year, month, date respectively.
I would like to read the latest csv file through the translate plugin. So, the logstash configuration used:
translate {
field => "id"
destination => "name"
dictionary_path => "/home/my-mapping-%{+YYYY-MM-dd}.csv"
}
But, looks like dictionary_path
parameter is unable to resolve %{+YYYY-MM-dd}
This is the error I got with it:
Invalid setting for translate filter plugin:
filter {
translate {
# This setting must be a path
# File does not exist or cannot be opened /home/my-mapping-%{+YYYY-MM-dd}.csv
dictionary_path => "/home/my-mapping-%{+YYYY-MM-dd}.csv"
Any workaround for this problem?
Thanks