0
votes

I have trouble to get the logstash (2.4.0) tutorial to work on Windows 7. This is working: bin\logstash.bat -f pipe.conf

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

When I enter then code in the msdos-window, I get expected log messages.

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

Tweaking the configuration file to get close to the tutorial, does not work. Then I get the following error message:

{
 :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"
} 

I call the script like before with: 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 {  }
}

The logfile: logstash-tutorial-dataset is available and accessable. I downloaded the file from the tutorial.

What did I miss and how do I get logstash to work with this configuration?

1

1 Answers

0
votes

According to the doc:

Paths must be absolute and cannot be relative.