将数据从csv文件导入到elasticsearch时,Logstash不会创建索引

时间:2016-02-26 07:55:28

标签: elasticsearch logstash

我在logstash文件夹中有配置文件(logstash.conf),其代码是..

input {
      file {
          path => "C:\Users\ADMIN\Downloads\Restaurant_Inspection_Scores.csv"
          type => "Restaurant_Inspection_Scores"
          start_position => "beginning"
          sincedb_path => "C:\Users\ADMIN\Downloads\dbfile2"
      }
}
filter {
    csv {
        columns => ["Restaurant Name","Zip Code","Inspection Date","Score","Address","Facility ID","Process Description"]
        separator => ","
    }
}
output {
    elasticsearch {
        action => "index"
        hosts => "localhost:9200"
        index => "logstash-%{+YYYY.MM.dd}"
        workers => 1
    }
     stdout {
     codec => rubydebug
     }
}

我的logstash版本是2.2.2,当我运行命令时 - bin / logstash -f logstash.conf ... Logstash没有在localhost中创建索引:9200虽然它没有显示错误(它只是说“Logstash启动完成“)。请帮忙!

编辑:调试输出

#<Proc:0x1cec15b@C:/Users/ADMIN/Downloads/logstash-2.2.2/vendor/bundle/jruby/1.9
/gems/logstash-output-elasticsearch-2.5.1-java/lib/logstash/outputs/elasticsearc
h/common.rb:57>, @logger=#<Cabin::Channel:0x461745 @metrics=#<Cabin::Metrics:0x1
53ff49 @metrics_lock=#<Mutex:0x1808bcc>, @metrics={}, @channel=#<Cabin::Channel:
0x461745 ...>>, @subscriber_lock=#<Mutex:0x24481f>, @level=:debug, @subscribers=
{12860=>#<Cabin::Outputs::IO:0x5791c0 @io=#<IO:fd 1>, @lock=#<Mutex:0x1ceb4ed>>}
, @data={}>, @last_flush=2016-02-26 13:48:55 +0530, @flush_interval=1, @stopping
=#<Concurrent::AtomicBoolean:0x114bdef>, @buffer=[], @flush_thread=#<Thread:0x87
d59a run>>", :interval=>1, :level=>:debug, :file=>"/Users/ADMIN/Downloads/logsta
sh-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.5.1-java/l
ib/logstash/outputs/elasticsearch/buffer.rb", :line=>"90", :method=>"interval_fl
ush"}←[0m
←[36mFlushing buffer at interval {:instance=>"#<LogStash::Outputs::ElasticSearch
::Buffer:0x1cc8478 @operations_mutex=#<Mutex:0x10b60f1>, @max_size=500, @operati
ons_lock=#<Java::JavaUtilConcurrentLocks::ReentrantLock:0x134ef08>, @submit_proc
=#<Proc:0x16ac2f0@C:/Users/ADMIN/Downloads/logstash-2.2.2/vendor/bundle/jruby/1.
9/gems/logstash-output-elasticsearch-2.5.1-java/lib/logstash/outputs/elasticsear
ch/common.rb:57>, @logger=#<Cabin::Channel:0x461745 @metrics=#<Cabin::Metrics:0x
153ff49 @metrics_lock=#<Mutex:0x1808bcc>, @metrics={}, @channel=#<Cabin::Channel
:0x461745 ...>>, @subscriber_lock=#<Mutex:0x24481f>, @level=:debug, @subscribers
={12860=>#<Cabin::Outputs::IO:0x5791c0 @io=#<IO:fd 1>, @lock=#<Mutex:0x1ceb4ed>>
}, @data={}>, @last_flush=2016-02-26 13:48:55 +0530, @flush_interval=1, @stoppin
g=#<Concurrent::AtomicBoolean:0x1643384>, @buffer=[], @flush_thread=#<Thread:0x1
d2c50f run>>", :interval=>1, :level=>:debug, :file=>"/Users/ADMIN/Downloads/logs
tash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.5.1-java
/lib/logstash/outputs/elasticsearch/buffer.rb", :line=>"90", :method=>"interval_
flush"}←[0m
←[36mFlushing buffer at interval {:instance=>"#<LogStash::Outputs::ElasticSearch
::Buffer:0x1504af1 @operations_mutex=#<Mutex:0x197ae6b>, @max_size=500, @operati
ons_lock=#<Java::JavaUtilConcurrentLocks::ReentrantLock:0x1a82181>, @submit_proc
=#<Proc:0x1f86276@C:/Users/ADMIN/Downloads/logstash-2.2.2/vendor/bundle/jruby/1.
9/gems/logstash-output-elasticsearch-2.5.1-java/lib/logstash/outputs/elasticsear
ch/common.rb:57>, @logger=#<Cabin::Channel:0x461745 @metrics=#<Cabin::Metrics:0x
153ff49 @metrics_lock=#<Mutex:0x1808bcc>, @metrics={}, @channel=#<Cabin::Channel
:0x461745 ...>>, @subscriber_lock=#<Mutex:0x24481f>, @level=:debug, @subscribers
={12860=>#<Cabin::Outputs::IO:0x5791c0 @io=#<IO:fd 1>, @lock=#<Mutex:0x1ceb4ed>>
}, @data={}>, @last_flush=2016-02-26 13:48:55 +0530, @flush_interval=1, @stoppin
g=#<Concurrent::AtomicBoolean:0x1f87954>, @buffer=[], @flush_thread=#<Thread:0x1
40e1c3 run>>", :interval=>1, :level=>:debug, :file=>"/Users/ADMIN/Downloads/logs
tash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.5.1-java
/lib/logstash/outputs/elasticsearch/buffer.rb", :line=>"90", :method=>"interval_
flush"}←[0m
←[36mFlushing buffer at interval {:instance=>"#<LogStash::Outputs::ElasticSearch
::Buffer:0x3076ee @operations_mutex=#<Mutex:0xf79a58>, @max_size=500, @operation
s_lock=#<Java::JavaUtilConcurrentLocks::ReentrantLock:0xc81d9e>, @submit_proc=#<
Proc:0x581ab2@C:/Users/ADMIN/Downloads/logstash-2.2.2/vendor/bundle/jruby/1.9/ge
ms/logstash-output-elasticsearch-2.5.1-java/lib/logstash/outputs/elasticsearch/c
ommon.rb:57>, @logger=#<Cabin::Channel:0x461745 @metrics=#<Cabin::Metrics:0x153f
f49 @metrics_lock=#<Mutex:0x1808bcc>, @metrics={}, @channel=#<Cabin::Channel:0x4
61745 ...>>, @subscriber_lock=#<Mutex:0x24481f>, @level=:debug, @subscribers={12
860=>#<Cabin::Outputs::IO:0x5791c0 @io=#<IO:fd 1>, @lock=#<Mutex:0x1ceb4ed>>}, @
data={}>, @last_flush=2016-02-26 13:48:55 +0530, @flush_interval=1, @stopping=#<
Concurrent::AtomicBoolean:0xd96c3b>, @buffer=[], @flush_thread=#<Thread:0xa1b853
 run>>", :interval=>1, :level=>:debug, :file=>"/Users/ADMIN/Downloads/logstash-2
.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.5.1-java/lib/l
ogstash/outputs/elasticsearch/buffer.rb", :line=>"90", :method=>"interval_flush"
}←[0m
Proc:0x581ab2@C:/Users/ADMIN/Downloads/logstash-2.2.2/vendor/bundle/jruby/1.9/ge
ms/logstash-output-elasticsearch-2.5.1-java/lib/logstash/outputs/elasticsearch/c
ommon.rb:57>, @logger=#<Cabin::Channel:0x461745 @metrics=#<Cabin::Metrics:0x153f
f49 @metrics_lock=#<Mutex:0x1808bcc>, @metrics={}, @channel=#<Cabin::Channel:0x4
61745 ...>>, @subscriber_lock=#<Mutex:0x24481f>, @level=:debug, @subscribers={12
860=>#<Cabin::Outputs::IO:0x5791c0 @io=#<IO:fd 1>, @lock=#<Mutex:0x1ceb4ed>>}, @
data={}>, @last_flush=2016-02-26 13:49:14 +0530, @flush_interval=1, @stopping=#<
Concurrent::AtomicBoolean:0xd96c3b>, @buffer=[], @flush_thread=#<Thread:0xa1b853
 run>>", :interval=>1, :level=>:debug, :file=>"/Users/ADMIN/Downloads/logstash-2
.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.5.1-java/lib/l
ogstash/outputs/elasticsearch/buffer.rb", :line=>"90", :method=>"interval_flush"
}←[0m
←[36mFlushing buffer at interval {:instance=>"#<LogStash::Outputs::ElasticSearch
::Buffer:0x1c5c037 @operations_mutex=#<Mutex:0x10232bf>, @max_size=500, @operati
ons_lock=#<Java::JavaUtilConcurrentLocks::ReentrantLock:0x13dab47>, @submit_proc
=#<Proc:0x1b291cc@C:/Users/ADMIN/Downloads/logstash-2.2.2/vendor/bundle/jruby/1.
9/gems/logstash-output-elasticsearch-2.5.1-java/lib/logstash/outputs/elasticsear
ch/common.rb:57>, @logger=#<Cabin::Channel:0x461745 @metrics=#<Cabin::Metrics:0x
153ff49 @metrics_lock=#<Mutex:0x1808bcc>, @metrics={}, @channel=#<Cabin::Channel
:0x461745 ...>>, @subscriber_lock=#<Mutex:0x24481f>, @level=:debug, @subscribers
={12860=>#<Cabin::Outputs::IO:0x5791c0 @io=#<IO:fd 1>, @lock=#<Mutex:0x1ceb4ed>>
}, @data={}>, @last_flush=2016-02-26 13:49:14 +0530, @flush_interval=1, @stoppin
g=#<Concurrent::AtomicBoolean:0x1ddd08f>, @buffer=[], @flush_thread=#<Thread:0x1
ba2760 run>>", :interval=>1, :level=>:debug, :file=>"/Users/ADMIN/Downloads/logs
tash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.5.1-java
/lib/logstash/outputs/elasticsearch/buffer.rb", :line=>"90", :method=>"interval_
flush"}←[0m
←[36mFlushing buffer at interval {:instance=>"#<LogStash::Outputs::ElasticSearch
::Buffer:0x19520ee @operations_mutex=#<Mutex:0x1aaa984>, @max_size=500, @operati
ons_lock=#<Java::JavaUtilConcurrentLocks::ReentrantLock:0xa82ad5>, @submit_proc=
#<Proc:0x1cec15b@C:/Users/ADMIN/Downloads/logstash-2.2.2/vendor/bundle/jruby/1.9
/gems/logstash-output-elasticsearch-2.5.1-java/lib/logstash/outputs/elasticsearc
h/common.rb:57>, @logger=#<Cabin::Channel:0x461745 @metrics=#<Cabin::Metrics:0x1
53ff49 @metrics_lock=#<Mutex:0x1808bcc>, @metrics={}, @channel=#<Cabin::Channel:
0x461745 ...>>, @subscriber_lock=#<Mutex:0x24481f>, @level=:debug, @subscribers=
{12860=>#<Cabin::Outputs::IO:0x5791c0 @io=#<IO:fd 1>, @lock=#<Mutex:0x1ceb4ed>>}
, @data={}>, @last_flush=2016-02-26 13:49:14 +0530, @flush_interval=1, @stopping
=#<Concurrent::AtomicBoolean:0x114bdef>, @buffer=[], @flush_thread=#<Thread:0x87
d59a run>>", :interval=>1, :level=>:debug, :file=>"/Users/ADMIN/Downloads/logsta
sh-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.5.1-java/l
ib/logstash/outputs/elasticsearch/buffer.rb", :line=>"90", :method=>"interval_fl
ush"}←[0m
←[36mFlushing buffer at interval {:instance=>"#<LogStash::Outputs::ElasticSearch
::Buffer:0x558d42 @operations_mutex=#<Mutex:0x927eb8>, @max_size=500, @operation
s_lock=#<Java::JavaUtilConcurrentLocks::ReentrantLock:0xade632>, @submit_proc=#<
Proc:0x150c229@C:/Users/ADMIN/Downloads/logstash-2.2.2/vendor/bundle/jruby/1.9/g
ems/logstash-output-elasticsearch-2.5.1-java/lib/logstash/outputs/elasticsearch/
common.rb:57>, @logger=#<Cabin::Channel:0x461745 @metrics=#<Cabin::Metrics:0x153
ff49 @metrics_lock=#<Mutex:0x1808bcc>, @metrics={}, @channel=#<Cabin::Channel:0x
461745 ...>>, @subscriber_lock=#<Mutex:0x24481f>, @level=:debug, @subscribers={1
2860=>#<Cabin::Outputs::IO:0x5791c0 @io=#<IO:fd 1>, @lock=#<Mutex:0x1ceb4ed>>},
@data={}>, @last_flush=2016-02-26 13:49:14 +0530, @flush_interval=1, @stopping=#
<Concurrent::AtomicBoolean:0x12e78bb>, @buffer=[], @flush_thread=#<Thread:0x179e
0e8 run>>", :interval=>1, :level=>:debug, :file=>"/Users/ADMIN/Downloads/logstas
h-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.5.1-java/li
b/logstash/outputs/elasticsearch/buffer.rb", :line=>"90", :method=>"interval_flu
sh"}←[0m
=#<Proc:0x16ac2f0@C:/Users/ADMIN/Downloads/logstash-2.2.2/vendor/bundle/jruby/1.
9/gems/logstash-output-elasticsearch-2.5.1-java/lib/logstash/outputs/elasticsear
ch/common.rb:57>, @logger=#<Cabin::Channel:0x461745 @metrics=#<Cabin::Metrics:0x
153ff49 @metrics_lock=#<Mutex:0x1808bcc>, @metrics={}, @channel=#<Cabin::Channel
:0x461745 ...>>, @subscriber_lock=#<Mutex:0x24481f>, @level=:debug, @subscribers
={12860=>#<Cabin::Outputs::IO:0x5791c0 @io=#<IO:fd 1>, @lock=#<Mutex:0x1ceb4ed>>
}, @data={}>, @last_flush=2016-02-26 13:49:47 +0530, @flush_interval=1, @stoppin
g=#<Concurrent::AtomicBoolean:0x1643384>, @buffer=[], @flush_thread=#<Thread:0x1
d2c50f run>>", :interval=>1, :level=>:debug, :file=>"/Users/ADMIN/Downloads/logs
tash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.5.1-java
/lib/logstash/outputs/elasticsearch/buffer.rb", :line=>"90", :method=>"interval_
flush"}←[0m
←[36mFlushing buffer at interval {:instance=>"#<LogStash::Outputs::ElasticSearch
::Buffer:0x558d42 @operations_mutex=#<Mutex:0x927eb8>, @max_size=500, @operation
s_lock=#<Java::JavaUtilConcurrentLocks::ReentrantLock:0xade632>, @submit_proc=#<
Proc:0x150c229@C:/Users/ADMIN/Downloads/logstash-2.2.2/vendor/bundle/jruby/1.9/g
ems/logstash-output-elasticsearch-2.5.1-java/lib/logstash/outputs/elasticsearch/
common.rb:57>, @logger=#<Cabin::Channel:0x461745 @metrics=#<Cabin::Metrics:0x153
ff49 @metrics_lock=#<Mutex:0x1808bcc>, @metrics={}, @channel=#<Cabin::Channel:0x
461745 ...>>, @subscriber_lock=#<Mutex:0x24481f>, @level=:debug, @subscribers={1
2860=>#<Cabin::Outputs::IO:0x5791c0 @io=#<IO:fd 1>, @lock=#<Mutex:0x1ceb4ed>>},
@data={}>, @last_flush=2016-02-26 13:49:47 +0530, @flush_interval=1, @stopping=#
<Concurrent::AtomicBoolean:0x12e78bb>, @buffer=[], @flush_thread=#<Thread:0x179e
0e8 run>>", :interval=>1, :level=>:debug, :file=>"/Users/ADMIN/Downloads/logstas
h-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.5.1-java/li
b/logstash/outputs/elasticsearch/buffer.rb", :line=>"90", :method=>"interval_flu
sh"}←[0m
←[36mFlushing buffer at interval {:instance=>"#<LogStash::Outputs::ElasticSearch
::Buffer:0x1c5c037 @operations_mutex=#<Mutex:0x10232bf>, @max_size=500, @operati
ons_lock=#<Java::JavaUtilConcurrentLocks::ReentrantLock:0x13dab47>, @submit_proc
=#<Proc:0x1b291cc@C:/Users/ADMIN/Downloads/logstash-2.2.2/vendor/bundle/jruby/1.
9/gems/logstash-output-elasticsearch-2.5.1-java/lib/logstash/outputs/elasticsear
ch/common.rb:57>, @logger=#<Cabin::Channel:0x461745 @metrics=#<Cabin::Metrics:0x
153ff49 @metrics_lock=#<Mutex:0x1808bcc>, @metrics={}, @channel=#<Cabin::Channel
:0x461745 ...>>, @subscriber_lock=#<Mutex:0x24481f>, @level=:debug, @subscribers
={12860=>#<Cabin::Outputs::IO:0x5791c0 @io=#<IO:fd 1>, @lock=#<Mutex:0x1ceb4ed>>
}, @data={}>, @last_flush=2016-02-26 13:49:47 +0530, @flush_interval=1, @stoppin
g=#<Concurrent::AtomicBoolean:0x1ddd08f>, @buffer=[], @flush_thread=#<Thread:0x1
ba2760 run>>", :interval=>1, :level=>:debug, :file=>"/Users/ADMIN/Downloads/logs
tash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.5.1-java
/lib/logstash/outputs/elasticsearch/buffer.rb", :line=>"90", :method=>"interval_
flush"}←[0m
←[36mFlushing buffer at interval {:instance=>"#<LogStash::Outputs::ElasticSearch
::Buffer:0x3076ee @operations_mutex=#<Mutex:0xf79a58>, @max_size=500, @operation
s_lock=#<Java::JavaUtilConcurrentLocks::ReentrantLock:0xc81d9e>, @submit_proc=#<
Proc:0x581ab2@C:/Users/ADMIN/Downloads/logstash-2.2.2/vendor/bundle/jruby/1.9/ge
ms/logstash-output-elasticsearch-2.5.1-java/lib/logstash/outputs/elasticsearch/c
ommon.rb:57>, @logger=#<Cabin::Channel:0x461745 @metrics=#<Cabin::Metrics:0x153f
f49 @metrics_lock=#<Mutex:0x1808bcc>, @metrics={}, @channel=#<Cabin::Channel:0x4
61745 ...>>, @subscriber_lock=#<Mutex:0x24481f>, @level=:debug, @subscribers={12
860=>#<Cabin::Outputs::IO:0x5791c0 @io=#<IO:fd 1>, @lock=#<Mutex:0x1ceb4ed>>}, @
data={}>, @last_flush=2016-02-26 13:49:47 +0530, @flush_interval=1, @stopping=#<
Concurrent::AtomicBoolean:0xd96c3b>, @buffer=[], @flush_thread=#<Thread:0xa1b853
 run>>", :interval=>1, :level=>:debug, :file=>"/Users/ADMIN/Downloads/logstash-2
.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.5.1-java/lib/l
ogstash/outputs/elasticsearch/buffer.rb", :line=>"90", :method=>"interval_flush"
}←[0m

0 个答案:

没有答案