Logstash - 运行 配置文件时注册插件时出错
Logstash - Error Registering Plugin when running config file
我得到错误:
[2018-03-05T09:22:00,976][ERROR][logstash.pipeline] Error registering plugin
[2018-03-05T09:22:01,023][ERROR][logstash.pipeline] Pipeline aborted due to error
[2018-03-05T09:22:01,070][ERROR][logstash.agent] Failed to execute action {:id=>:main,
:action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could
not execute action: LogStash::PipelineAction::Create/pipeline_id:main,
action_result: false", :backtrace=>nil}
这是我的配置文件:
input {
file {
path => ["C:\logstash-6.2.2\conversation_stats\conversation_stats.json"]
start_position => "beginning"
sincedb_path => "/dev/null"
ignore_older => 0
}
}
filter{
grok{
match =>{ "message"=>"%{DATA:id} %{DATA:clientCode} %{DATA:conversationID} %{DATA:employeeID} %{DATA:entities.entity} %{DATA:entities.location}
%{DATA:entities.value} %{DATA:entities.confidence} %{DATA:input} %{DATA:intents} %{DATA:locale}"
}
overwrite => ["message"]
}
}
output{
stdout { codec => rubydebug }
file {
codec => "json_lines"
path => ["C:\logstash-6.2.2\Test\testOutput.json"]
}
elasticsearch{
action =>"index"
hosts => ["localhost:9200"]
index =>"Converstation_Statistics_%{clientCode}"
}
}
这是一些示例数据:
{
"_id" : ObjectId("5a2aa415"),
"clientCode" : "demo",
"conversationId" : "d6416ec0-da7aa79f3215",
"employeeId" : "45",
"entities" : [
{
"entity" : "status",
"location" : [
NumberInt("09"),
NumberInt("210")
],
"value" : "ok",
"confidence" : NumberInt("11")
}
],
"input" : {
"feedback" : {
"feedbackSubject" : "my feedbac",
"feedbackText" : "feedback\nthis is good\nI love this",
"feedbackCategory" : "",
"conversationId" : "d6416ec0-da7aa79f3215",
"conversationText" : "(HI) [Greetings, human.]",
"conversationNodeName" : "root"
}
},
"intents" : [
{
"intent" : "feedbackresponse",
"confidence" : NumberInt("1")
}
],
"locale" : "en-ca"
}
我有一个类似的 json 文件,它工作得很好,它上传到 elastic 没有任何错误
这几天我一直在寻找如何解决这个问题,但一无所获,将不胜感激。
Elasticsearch 通常托管在端口 9200。因此行 hosts => ["localhost:5601"]
可能应该更改为 hosts => ["localhost:9200"]
或托管 ES 实例的任何位置。
我得到错误:
[2018-03-05T09:22:00,976][ERROR][logstash.pipeline] Error registering plugin
[2018-03-05T09:22:01,023][ERROR][logstash.pipeline] Pipeline aborted due to error
[2018-03-05T09:22:01,070][ERROR][logstash.agent] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: LogStash::PipelineAction::Create/pipeline_id:main, action_result: false", :backtrace=>nil}
这是我的配置文件:
input {
file {
path => ["C:\logstash-6.2.2\conversation_stats\conversation_stats.json"]
start_position => "beginning"
sincedb_path => "/dev/null"
ignore_older => 0
}
}
filter{
grok{
match =>{ "message"=>"%{DATA:id} %{DATA:clientCode} %{DATA:conversationID} %{DATA:employeeID} %{DATA:entities.entity} %{DATA:entities.location}
%{DATA:entities.value} %{DATA:entities.confidence} %{DATA:input} %{DATA:intents} %{DATA:locale}"
}
overwrite => ["message"]
}
}
output{
stdout { codec => rubydebug }
file {
codec => "json_lines"
path => ["C:\logstash-6.2.2\Test\testOutput.json"]
}
elasticsearch{
action =>"index"
hosts => ["localhost:9200"]
index =>"Converstation_Statistics_%{clientCode}"
}
}
这是一些示例数据:
{
"_id" : ObjectId("5a2aa415"),
"clientCode" : "demo",
"conversationId" : "d6416ec0-da7aa79f3215",
"employeeId" : "45",
"entities" : [
{
"entity" : "status",
"location" : [
NumberInt("09"),
NumberInt("210")
],
"value" : "ok",
"confidence" : NumberInt("11")
}
],
"input" : {
"feedback" : {
"feedbackSubject" : "my feedbac",
"feedbackText" : "feedback\nthis is good\nI love this",
"feedbackCategory" : "",
"conversationId" : "d6416ec0-da7aa79f3215",
"conversationText" : "(HI) [Greetings, human.]",
"conversationNodeName" : "root"
}
},
"intents" : [
{
"intent" : "feedbackresponse",
"confidence" : NumberInt("1")
}
],
"locale" : "en-ca"
}
我有一个类似的 json 文件,它工作得很好,它上传到 elastic 没有任何错误
这几天我一直在寻找如何解决这个问题,但一无所获,将不胜感激。
Elasticsearch 通常托管在端口 9200。因此行 hosts => ["localhost:5601"]
可能应该更改为 hosts => ["localhost:9200"]
或托管 ES 实例的任何位置。