grafana/loki · error · Fluent::ConfigError

URL parameter must have HTTP/HTTPS scheme

Error message

URL parameter must have HTTP/HTTPS scheme

What it means

Error "URL parameter must have HTTP/HTTPS scheme" thrown in grafana/loki.

Source

Thrown at clients/cmd/fluentd/lib/fluent/plugin/out_loki.rb:105

      desc 'if a record only has 1 key, then just set the log line to the value and discard the key.'
      config_param :drop_single_key, :bool, default: false

      desc 'whether or not to include the fluentd_thread label when multiple threads are used for flushing'
      config_param :include_thread_label, :bool, default: true

      config_section :buffer do
        config_set_default :@type, DEFAULT_BUFFER_TYPE
        config_set_default :chunk_keys, []
      end

      # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
      def configure(conf)
        compat_parameters_convert(conf, :buffer)
        super
        @uri = URI.parse("#{@url}/loki/api/v1/push")
        unless @uri.is_a?(URI::HTTP) || @uri.is_a?(URI::HTTPS)
          raise Fluent::ConfigError, 'URL parameter must have HTTP/HTTPS scheme'
        end

        @record_accessors = {}
        conf.elements.select { |element| element.name == 'label' }.each do |element|
          element.each_pair do |k, v|
            element.has_key?(k) # rubocop:disable Style/PreferredHashMethods #to suppress unread configuration warning
            v = k if v.empty?
            @record_accessors[k] = record_accessor_create(v)
          end
        end
        @remove_keys_accessors = []
        @remove_keys.each do |key|
          @remove_keys_accessors.push(record_accessor_create(key))
        end

        # If configured, load and validate client certificate (and corresponding key)
        if client_cert_configured?
          load_client_cert

View on GitHub (pinned to 24cfedd4f6)

When it happens

Trigger: Thrown at clients/cmd/fluentd/lib/fluent/plugin/out_loki.rb:105 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of grafana/loki@24cfedd4f6 (2026-08-15). Data as JSON: /api/errors/d5a0cfe01077c65e. Report an issue: GitHub.