i am trying to Generically map a csv file, so that the order of the columns wont matter. i know how to do this:
input {
file {
path => "/opt/tradertools/omer/omer.csv"
type => "csv"
}
filter {
if [type] == "csv" {
csv{
columns => ["col example 1","col example 2"]
}
output {
stdout { codec => rubydebug }
file {
path => "/var/log/logstash/%{type}OMER.%{+yyyy.MM.dd.HH}"
}
}
but if i switch the csv columns order, i also needs to change the code... someone got an idea?