logstash抛出未找到的异常模板文件

时间:2017-11-26 17:52:39

标签: docker-compose logstash centos7 elastic-stack elasticsearch-5

我尝试使用docker-compose安装docker-elk堆栈,弹性搜索和kibana工作正常,但我的logstash没有连接到下面显示的弹性搜索和抛出错误,我安装了这个这是第一次没有太多的知识。

logstash-5-6 | [2017-11-26T06:09:06,455] [错误] [logstash.outputs.elasticsearch]无法安装模板。 {:message =>"模板文件''无法找到!",:class =>" ArgumentError",:backtrace => [" /usr/share/logstash/vendor/bundle/jruby/1.9/gems /logstash-output-elasticsearch-7.4.2-java/lib/logstash/outputs/elasticsearch/template_manager.rb:37:in install_template'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-7.4.2-java/lib/logstash/outputs/elasticsearch/common.rb:58:in get_template'"," / usr / share /logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-7.4.2-java/lib/logstash/outputs/elasticsearch/template_manager.rb:7:in register'", "/usr/share/logstash/logstash-core/lib/logstash/output_delegator_strategies/shared.rb:9:in install_template'& #34;," /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-7.4.2-java/lib/logstash/outputs/elasticsearch/common.rb:25 :在register'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:290:in注册'"," /usr/share/logstash/logstash-core/lib/logstash/output_delegator.rb:43:in register_plugins'", "org/jruby/RubyArray.java:1613:in register_plugin&#39 ;"," /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:301:register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:310:in每个'"," /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:301:in run'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:398:in start_workers'"," / usr / share / logstash / logstash-core /lib/logstash/pipeline.rb:235:in {{1} } start_pipeline'"]} logstash-5-6 | [2017-11-26T06:09:06,455] [INFO] [logstash.outputs.elasticsearch]新的Elasticsearch输出{:class =>" LogStash :: Outputs :: ElasticSearch" ,:host => [" // elasticsearch-5-6:9201"]}

Logstash.conf

input {
    tcp {
        port => 5001
    }
}

## Add your filters / logstash plugins configuration here

output {
    elasticsearch {
        hosts => "localhost:9201"
    }
}

1 个答案:

答案 0 :(得分:2)

提供自定义模板并在输出插件中更新其路径解决了这个问题。