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}"