通过Logstash 插入文本数据(csv)Elasticsearch
# Sample Logstash configuration for creating a simple
# Beats -> Logstash -> Elasticsearch pipeline.
input {
file {
# 斜杠千万也写错了,是正斜杠,反斜杠无法导入
path => ["D:/isee_analyse.csv"]
start_position => "beginning"
}
}
filter {
csv {
separator => ","
# 列名
columns => ["CREATE_TIME","SYS_USER_ROW_ID"]
}
mutate {
convert => {
"CREATE_TIME" => "string"
"SYS_USER_ROW_ID" => "string"
}
}
}
output {
elasticsearch {
hosts => ["134.96.176.23:23004"]
index => "test2"
document_type => "test2"
}
stdout { codec => rubydebug }
}
相关文章