logstash ArgumentError

时间:2016-10-10 15:08:32

标签: logstash logstash-configuration

我无法让logstash (2.4.0) tutorial在Windows 7上运行。 这是有效的:SELECT REPLACE(text,'<a','<a target="_blank" '); Go

bin\logstash.bat -f pipe.conf

当我在msdos窗口中输入代码时,我得到了预期的日志消息。

# pipe.conf
input {
  stdin {  }
}
output {
  stdout {  }
}

调整配置文件以接近教程,不起作用。然后我收到以下错误消息:

C:\Users\foo\Workspace\Reporting\Stack5.0 pipe.conf
Settings: Default pipeline workers: 4
Pipeline main started
configuration in a file
2016-10-10T14:32:13.506Z foopc configuration in a file
yehaaaa
2016-10-10T14:32:18.320Z foopc yehaaaa

我像以前一样调用脚本:{ :timestamp=>"2016-10-10T16:45:25.605000+0200", :message=>"Pipeline aborted due to error", :exception=>"ArgumentError", :backtrace=>["C:/Users/foo/Workspace/Reporting/Stack5.0/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-input-file-2.2.5/lib/logstash/inputs/file.rb:187:in `register'", "org/jruby/RubyArray.java:1613:in `each'", "C:/Users/foo/Workspace/Reporting/Stack5.0/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-input-file-2.2.5/lib/logstash/inputs/file.rb:185:in `register'", "C:/Users/foo/Workspace/Reporting/Stack5.0/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:330:in `start_inputs'", "org/jruby/RubyArray.java:1613:in `each'", "C:/Users/foo/Workspace/Reporting/Stack5.0/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:329:in `start_inputs'", "C:/Users/foo/Workspace/Reporting/Stack5.0/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:180:in `start_workers'", "C:/Users/foo/Workspace/Reporting/Stack5.0/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:136:in `run'", "C:/Users/foo/Workspace/Reporting/Stack5.0/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/agent.rb:491:in `start_pipeline'"], :level=>:error} {:timestamp=>"2016-10-10T16:45:28.608000+0200", :message=>"stopping pipeline", :id=>"main" }

bin\logstash.bat -f pipe.conf

日志文件:# pipe.conf input { # stdin { } # https://www.elastic.co/guide/en/logstash/current/advanced-pipeline.html#configuring-file-input # logstash 2.4.0 file { path => "logstash-tutorial-dataset" start_position => beginning ignore_older => 0 } } # The filter part of this file is commented out to indicate that it is # optional. filter { grok { match => { "message" => "%{COMBINEDAPACHELOG}"} } } output { stdout { } } 可用且可访问。我从tutorial下载了该文件。

我错过了什么?如何让logstash使用此配置?

1 个答案:

答案 0 :(得分:0)

根据the doc

Paths must be absolute and cannot be relative.