    <store>
      @type elasticsearch
      @id elasticsearch-apps
      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
      retry_tag "retry_es"

      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::ElasticsearchSimpleSniffer'}"
      reload_on_failure false
      flush_interval "#{ENV['ES_FLUSH_INTERVAL'] || '1s'}"
      max_retry_wait "#{ENV['ES_RETRY_WAIT'] || '300'}"
      disable_retry_limit true
      buffer_type file
      buffer_path '/var/lib/fluentd/buffer-output-es-config'
      buffer_queue_limit "#{ENV['BUFFER_QUEUE_LIMIT'] || '32' }"
      buffer_chunk_limit "#{ENV['BUFFER_SIZE_LIMIT'] || '8m' }"
      buffer_queue_full_action "#{ENV['BUFFER_QUEUE_FULL_ACTION'] || 'block'}"
      flush_at_shutdown "#{ENV['FLUSH_AT_SHUTDOWN'] || 'false'}"

      write_operation 'create'

      # 2 ^ 31
      request_timeout 2147483648
    </store>
