Windows:在logstash中加载csv文件

时间:2017-08-28 04:41:05

标签: elasticsearch logstash logstash-configuration kibana-5

我正在我的机器上运行ELK。我想在logstash中加载csv文件,以便我可以在Kibana中可视化数据。

当我执行命令bin/logastash -f D:/config/logstash_scaler.config时,它会给出以下错误。

NoMethodError: undefined method `each_pair' for #<String:0xe82894>
Did you mean?  each_char
  paths= at D:/Java/Java Support/ELK/jruby-    9.1.12.0/lib/ruby/stdlib/rubygems.rb:395
  setup! at D:/Java/Java Support/ELK/logstash-    5.5.2/lib/bootstrap/bundler.rb:52
  <main> at D:/Java/Java Support/ELK/logstash-    5.5.2/lib/bootstrap/environment.rb:67

这是我的logstash配置文件

input{
    file{
        path => "D:/Java/Java Support/ELK/data/scalerloaddata.csv"
        start_position => "beginning"
        sincedb_path => "/dev/null"
    }
}
filter {
    csv {
        seperator = ","
        columns => ["Time","Host","load"]
    }

    mutate {convert => ["load","float"]}
}
output{
    elasticsearch {
        host => "localhost"
        index => "scaler"
        document_type => "scaler_series"
    }

    stdout{}
}

0 个答案:

没有答案