gpt4 book ai didi

csv - Logstash CSV导入

转载 作者:行者123 更新时间:2023-12-03 00:19:47 24 4
gpt4 key购买 nike

我正在使用Ubuntu 14.04 LTS,Kibana,Logstash和Elasticsearch。我尝试了以下代码将csv文件导入LogStash,但未检测到。

input 
{
file
{
path => "/home/kibana/Downloads/FL_insurance_sample.csv"
type => "FL_insurance_sample.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}

filter
{
csv
{
columns => ["policyID","statecode","country","eq_site_limit","hu_site_limit",
"fl_sitelimit","fr_site_limit","tiv_2011","tiv_2012","eq_site_deductible",
"hu_site_deductible","fl_site_deductible","fr_site_deductible","point_latitude",
"point_longtitude","line","construction","point_granularity"]
separator => ","
}
}

output
{
elasticsearch {
action => "index"
host => "localhost"
index => "promosms-%{+dd.MM.YYYY}"
workers => 1
}
stdout
{
codec => rubydebug
}

}

我什至做到了
sudo service logstash restart 

当我在Kibana GUI界面中进行索引映射时,我选择了Logstash- *,但找不到所需的数据。
附言我的配置文件存储在/etc/logstash/conf.d/simple.conf中

最佳答案

在您的问题中,您声明您去过Kibana中的Logstash-*,但是您的配置文件显示您正在将数据放入promosms-%{+dd.MM.YYYY}中。

您需要进入kibana4的设置部分,并将[promosms-]DD.MM.YYYY放入“索引名称”或“模式”框中,然后选中“索引包含基于时间的事件”和“使用事件时间来创建索引名称”。

然后,您可能还希望将其设置为默认索引。

关于csv - Logstash CSV导入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31979022/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com