1

我是弹性搜索的新手,我正在尝试使用 logstash 将数据从 csv 导入弹性搜索,并希望在 kibana 中显示输出。我正在使用下面的 logstash conf 文件。

input {
 file {
  path => ["D:/AnalyticsTool/Exe/logstash-5.2.0/logstash-5.2.0/bin/data.csv"]
  type => "core2"
  start_position => "beginning" 
 }
}
filter {
 csv {
  separator => ","
  columns => ["Date","Open","High","Low","Close","Volume","Adj Close"]
 }
 mutate {convert => ["High", "float"]}
 mutate {convert => ["Open", "float"]}
 mutate {convert => ["Low", "float"]}
 mutate {convert => ["Close", "float"]}
 mutate {convert => ["Volume", "float"]}
}
output {
 elasticsearch {
  action => "index"
  hosts => ["localhost:9200"]
  index => "stock"
  workers => 1
  user => elastic
  password => changeme
 }
 stdout { codec => rubydebug}
}

我无法在 kibana 中进行可视化。我需要在elasticsearch中手动创建索引还是kibana会自动创建上述索引?

4

0 回答 0