    <store>
      @type elasticsearch
      @log_level "#{ENV['ES_LOG_LEVEL'] || 'warn'}"
      host "#{ENV['ES_HOST']}"
      port "#{ENV['ES_PORT']}"
      scheme https
      ssl_version TLSv1_2
      target_index_key viaq_index_name
      id_key viaq_msg_id
      remove_keys viaq_index_name
      user fluentd
      password changeme

      client_key "#{ENV['ES_CLIENT_KEY']}"
      client_cert "#{ENV['ES_CLIENT_CERT']}"
      ca_file "#{ENV['ES_CA']}"

      type_name com.redhat.viaq.common
      write_operation 'create'

      reload_connections "#{ENV['ES_RELOAD_CONNECTIONS'] || 'true'}"
      # https://github.com/uken/fluent-plugin-elasticsearch#reload-after
      reload_after "#{ENV['ES_RELOAD_AFTER'] || '200'}"
      # https://github.com/uken/fluent-plugin-elasticsearch#sniffer-class-name
      sniffer_class_name "#{ENV['ES_SNIFFER_CLASS_NAME'] || 'Fluent::Plugin::ElasticsearchSimpleSniffer'}"
      reload_on_failure false
      # 2 ^ 31
      request_timeout 2147483648
      <buffer>
        @type file
        path '/var/lib/fluentd/es-retry'
        flush_interval "#{ENV['ES_FLUSH_INTERVAL'] || '1s'}"
        flush_thread_count "#{ENV['ES_FLUSH_THREAD_COUNT'] || 2}"
        flush_at_shutdown "#{ENV['FLUSH_AT_SHUTDOWN'] || 'false'}"
        retry_max_interval "#{ENV['ES_RETRY_WAIT'] || '300'}"
        retry_forever true
        queued_chunks_limit_size "#{ENV['BUFFER_QUEUE_LIMIT'] || '32' }"
        chunk_limit_size "#{ENV['BUFFER_SIZE_LIMIT'] || '8m' }"
        overflow_action "#{ENV['BUFFER_QUEUE_FULL_ACTION'] || 'block'}"
      </buffer>
    </store>
