【问题标题】:LogStash setup LoadErrorLogStash 设置 LoadError
【发布时间】:2015-07-28 14:14:20
【问题描述】:

我正在尝试设置 LogStash,我正在关注 tutorial。但是当我运行命令时 bin/logstash -e 'input { stdin { } } output { stdout {} }' 它给了我以下错误:

warning: --1.9 ignored
LoadError: no such file to load -- bundler
  require at org/jruby/RubyKernel.java:940
  require at C:/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
   setup! at C:/Users/ryan.dai/Desktop/logstash-1.5.3/lib/bootstrap/bundler.rb:43
    <top> at c:/Users/ryan.dai/Desktop/logstash-1.5.3/lib/bootstrap/environment.rb:46

我按照其他人的建议尝试了jruby -S gem install bundler,但它不起作用。对 Ruby 完全陌生,发生了什么,我该怎么办?

【问题讨论】:

  • 是否安装 bundler gem 失败?
  • @JeremyRodi nah 它说成功安装了 bundler-1.10.6

标签: ruby jruby logstash


【解决方案1】:

您可以使用下面的URL 来安装整个ELK Setup

这里需要将file(log)作为路径传递给logstash配置的输入。

input {
  file {
    path => "/tmp/access_log"
    start_position => "beginning"
   }
}

filter {
  grok {
    match => { "message" => "%{COMBINEDAPACHELOG}" }
  }
  date {
    match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
  }
}

output {
  elasticsearch { host => localhost }
  stdout { codec => rubydebug }
}

ELK Setup Installtion

使用 CMD 提示符运行的命令:

logstash -f logstash.conf 用于运行 logstash

logstash --configtest -f logstash.conf 用于配置测试

logstash --debug -f logstash.conf 用于调试logstash配置

Logstash configuration Examples

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-12-26
    • 1970-01-01
    • 2023-03-28
    • 1970-01-01
    • 2020-01-19
    • 2021-06-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多