Logstash的反向代理-现在有可能吗?

时间:2018-09-06 10:32:59

标签: logstash logstash-configuration

我在Debian 9.5上安装了Logstash 6.4。

最近,我不得不将Logstash移到该区域,其中唯一可以访问Internet的选项是通过反向代理。在我的Logstash配置中,我有多个http_pollers和一个高音扬声器插件,但是由于连接问题,所有它们都不再起作用。 2014年10月1日,提出了类似的问题。Configuring Proxy for Logstash

在/ etc / profile中配置

MY_PROXY_URL="http://proxy.myproxy.net:8080"
HTTP_PROXY=$MY_PROXY_URL
HTTPS_PROXY=$MY_PROXY_URL
FTP_PROXY=$MY_PROXY_URL
http_proxy=$MY_PROXY_URL
https_proxy=$MY_PROXY_URL
ftp_proxy=$MY_PROXY_URL
export HTTP_PROXY HTTPS_PROXY FTP_PROXY http_proxy https_proxy ftp_proxy
export NODE_EXTRA_CA_CERTS="/etc/ca-certificates/proxy.myproxy.net.crt"

在/etc/logstash/jvm.options中配置

SET LS_JAVA_OPTS=-Dhttp.proxyHost=http://proxy.myproxy.net -Dhttp.proxyPort=8080

但是似乎Logstash没有使用代理。

[2018-09-06T12:13:50,054][WARN ][logstash.inputs.twitter ] Twitter client error {:message=>"Connection refused - connect(2) for "199.16.156.20" port 443", :exception=>"Errno::ECONNREFUSED", :backtrace=>["org/jruby/ext/socket/RubyTCPSocket.java:134:in initialize'", "org/jruby/RubyIO.java:875:innew'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-twitter-3.0.8/lib/logstash/inputs/twitter/patches.rb:26:in stream'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-twitter-3.0.8/lib/logstash/inputs/twitter/patches.rb:58:inrequest'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/twitter-5.15.0/lib/twitter/streaming/client.rb:37:in filter'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-twitter-3.0.8/lib/logstash/inputs/twitter.rb:138:inrun'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:408:in inputworker'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:402:inblock in start_input'"], :options=>nil}

_http_request_failure, _split_type_failure, _grokparsefailure, _geoip_lookup_failure

在Logstash的当前阶段(必须使用反向代理)是否有可能使该配置正常工作? 如果是,关于在反向代理后面配置Logstash的当前建议是什么?

0 个答案:

没有答案