From 2d9bc7f3b2c30dc6dc0e00f80fa8a54a0904777c Mon Sep 17 00:00:00 2001 From: kaiyou Date: Thu, 9 May 2019 10:05:47 +0200 Subject: [PATCH] Support using an IPv6 in the Loki push url --- fluentd/fluent-plugin-loki/lib/fluent/plugin/out_loki.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fluentd/fluent-plugin-loki/lib/fluent/plugin/out_loki.rb b/fluentd/fluent-plugin-loki/lib/fluent/plugin/out_loki.rb index f2dfd40c493d0..da669f0a79c07 100644 --- a/fluentd/fluent-plugin-loki/lib/fluent/plugin/out_loki.rb +++ b/fluentd/fluent-plugin-loki/lib/fluent/plugin/out_loki.rb @@ -90,7 +90,7 @@ def write(chunk) use_ssl: uri.scheme == 'https' } log.info "sending #{req.body.length} bytes" - res = Net::HTTP.start(uri.host, uri.port, **opts) { |http| http.request(req) } + res = Net::HTTP.start(uri.hostname, uri.port, **opts) { |http| http.request(req) } unless res && res.is_a?(Net::HTTPSuccess) res_summary = if res "#{res.code} #{res.message} #{res.body}"