def configure(conf)
      compat_parameters_convert(conf, :buffer)
      super
      @splunk_url = @protocol + '://' + @host + ':' + @port + '/services/collector/event'
      log.info 'splunkhec: sending data to ' + @splunk_url

      if conf['event_host'] == nil
        begin
          @event_host = `hostname`.delete!("\n")
        rescue
          @event_host = 'unknown'
        end
      end
      @packer = Fluent::Engine.msgpack_factory.packer
    end
def configure(conf)
      compat_parameters_convert(conf, :buffer)
      super
      @splunk_url = @protocol + '://' + @host + ':' + @port + '/services/collector/event'
      log.info 'splunkhec: sending data to ' + @splunk_url

      if conf['event_host'] == nil
        begin
          @event_host = `hostname`.delete!("\n")
        rescue
          @event_host = 'unknown'
        end
      end
      @packer = Fluent::Engine.msgpack_factory.packer
    end
This method is called before starting.
 Here we construct the Splunk HEC URL to POST data to
 If the configuration is invalid, raise Fluent::ConfigError.