我有一个简单的conf文件,用于将数据从csv加载到es。 我为此添加了csv过滤器,并添加了另一个过滤器以格式化csv文件中的日期。
这是我的配置文件
input {
file {
path => ["/Users/yatingrover/Documents/data/satya/101.csv"]
start_position => "beginning"
}
}
filter {
csv {
columns => [
"dateTime",
"unixEpoch",
"status",
"ratio",
"roomNo"
]
}
date {
match => [ "dateTime", "dd-MM-yyyy HH:mm:ss" ]
target => "dateNew"
}
}
output {
stdout { codec => rubydebug }
elasticsearch {
action => "index"
hosts => "localhost"
index => "myelasticindex"
document_type => "test"
document_id => "%{unixEpoch}"
workers => 1
}
}
这些是最终将logstash卡住的控制台日志
[2018-08-06T17:45:03,447][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["//localhost"]}
[2018-08-06T17:45:04,312][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0xb8ec047 run>"}
[2018-08-06T17:45:04,574][INFO ][logstash.agent ] Pipelines running {:count=>1, :pipelines=>["main"]}
csv中的日期字段为
dateTime的值为2/2/2018 20:16:46
这是usr / local / var / log / logstash文件中的错误
[2018-08-06T15:43:25,198][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: org.jruby.exceptions.RaiseException: (SystemExit) exit
Sending Logstash's logs to /usr/local/Cellar/logstash/6.2.3/libexec/logs which is now configured via log4j2.properties
[2018-08-06T17:13:58,351][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"/usr/local/Cellar/logstash/6.2.3/libexec/modules/netflow/configuration"}
[2018-08-06T17:13:58,377][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/usr/local/Cellar/logstash/6.2.3/libexec/modules/fb_apache/configuration"}
ERROR: Pipelines YAML file is empty. Location: /usr/local/Cellar/logstash/6.2.3/libexec/config/pipelines.yml
bin/logstash -f CONFIG_PATH [-t] [-r] [] [-w COUNT] [-l LOG]
bin/logstash --modules MODULE_NAME [-M "MODULE_NAME.var.PLUGIN_TYPE.PLUGIN_NAME.VARIABLE_NAME=VALUE"] [-t] [-w COUNT] [-l LOG]
bin/logstash -e CONFIG_STR [-t] [--log.level fatal|error|warn|info|debug|trace] [-w COUNT] [-l LOG]
bin/logstash -i SHELL [--log.level fatal|error|warn|info|debug|trace]
bin/logstash -V [--log.level fatal|error|warn|info|debug|trace]
bin/logstash --help
[2018-08-06T17:13:58,726][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: org.jruby.exceptions.RaiseException: (SystemExit) exit
我不确定我在做什么错