我想从这个存储库构建 Docker-ELK 。
这是我的 logstash.conf 文件
input {
jdbc {
jdbc_driver_library => "/home/edsoft/IdeaProjects/docker-elk/resources/mysql-connector-java-5.1.36-bin.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/yazilimokulu"
jdbc_user => "root"
jdbc_password => "1"
schedule => "* * * * *"
statement => "select * from posts"
}
tcp {
port => 5000
}
}
## Add your filters / logstash plugins configuration here
output {
elasticsearch {
hosts => ["elasticsearch:9200"]
index => "posts"
document_type => "post"
document_id => "%{id}" ## must be lower case
}
}
我用 docker-compose 运行 docker。Kibana 和 ElasticSearch 启动成功但 Logstash 抛出错误
LoadError: no such file to load -- /home/edsoft/IdeaProjects/docker-elk/resources/mysql-connector-java-5.1.36-bin
logstash_1 | require at org/jruby/RubyKernel.java:1040
logstash_1 | require at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/polyglot-0.3.5/lib/polyglot.rb:65
logstash_1 | load_drivers at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.1.3/lib/logstash/plugin_mixins/jdbc.rb:134
logstash_1 | each at org/jruby/RubyArray.java:1613
logstash_1 | load_drivers at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.1.3/lib/logstash/plugin_mixins/jdbc.rb:132
logstash_1 | prepare_jdbc_connection at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.1.3/lib/logstash/plugin_mixins/jdbc.rb:146
logstash_1 | register at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.1.3/lib/logstash/inputs/jdbc.rb:191
logstash_1 | register_plugin at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:282
logstash_1 | register_plugins at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:293
logstash_1 | each at org/jruby/RubyArray.java:1613
logstash_1 | register_plugins at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:293
logstash_1 | start_inputs at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:436
logstash_1 | start_workers at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:337
logstash_1 | run at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:232
logstash_1 | start_pipeline at /usr/share/logstash/logstash-core/lib/logstash/agent.rb:387
我写路径 ...bin.jar 但从文件名中删除 .jar 时出错。我写 ..bin.jar.jar 错误代码是 ..bin.jar 但找不到文件。
请帮我
谢谢