【发布时间】:2021-05-01 00:57:49
【问题描述】:
我正在尝试根据各种 csv 在同一索引中生成各种类型。由于我不知道 csv 的数量,因此为每个输入进行输入将是不可行的。 那么有谁知道如何使用文件名生成类型,并在其中分别引入 csv?
input {
file {
path => "/home/user/Documents/data/*.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
separator => ","
skip_header => "true"
autodetect_column_names => true
autogenerate_column_names => true
}
}
output {
elasticsearch {
hosts => "http://localhost:9200"
index => "final_index"
}
stdout {}
}
非常感谢
【问题讨论】: