我正在使用这个Dockerfile创建一个码头映像
FROM docker.elastic.co/logstash/logstash:5.5.0
RUN rm -f /usr/share/logstash/pipeline/logstash.conf
RUN /usr/share/logstash/bin/logstash-plugin install logstash-filter-clone并使用以下方法运行此映像:
docker build -t y:y - < ./Dockerfile并使用以下方法运行:
docker run -it --rm -v "$PWD":/config-dir y1:y1 -f /config-dir/logstash.conf而这是logstash.yml
input{
exec{
command=>'curl -k -i -u admin:admin -s https://some.url'
interval=>10
codec=>"json"
type=>"curl"
}
}
output {
stdout { codec => rubydebug }
}我的问题是,来自未知原因的对接者也在那里运行,我不能覆盖elasticsearch输出插件。
2017-10-18T11:02:33,196][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://logstash_system:xxxxxx@elasticsearch:9200/, :path=>"/"}
[2017-10-18T11:02:33,209][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://logstash_system:xxxxxx@elasticsearch:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://logstash_system:xxxxxx@elasticsearch:9200/][Manticore::ResolutionFailure] elasticsearch"}
[2017-10-18T11:02:33,299][INFO ][logstash.licensechecker.licensereader] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://logstash_system:xxxxxx@elasticsearch:9200/, :path=>"/"}
[2017-10-18T11:02:33,311][WARN ][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://logstash_system:xxxxxx@elasticsearch:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://logstash_system:xxxxxx@elasticsearch:9200/][Manticore::ResolutionFailure] elasticsearch"}我试着把exec放入容器中,找出这个配置在哪里存在但失败了,我很难理解这个弹性搜索输出插件是在哪里配置的,以及如何禁用它?
发布于 2017-10-18 12:17:08
您需要禁用XPack监视位。Logstash试图向ES发送健康信息,但它找不到。
只需将其添加到Dockerfile中即可。
ENV XPACK_MONITORING_ENABLED=falsehttps://stackoverflow.com/questions/46808990
复制相似问题