From d1fbb260a0e9cd804fe533df2b2a8ab9514a4172 Mon Sep 17 00:00:00 2001
From: kaiyou <pierre@jaury.eu>
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 f2dfd40c..da669f0a 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 @@ module Fluent
           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}"
-- 
GitLab