############################# Mockbeat ######################################
mockbeat:
############################# General ############################################

# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
# If this options is not defined, the hostname is used.
name:

# The tags of the shipper are included in their own field with each
# transaction published. Tags make it easy to group servers by different
# logical properties.
tags: [
{%- if agent_tags -%}
	{%- for tag in agent_tags -%}
		"{{ tag }}"
		{%- if not loop.last %}, {% endif -%}
	{%- endfor -%}
{%- endif -%}]

#================================ Queue =====================================

queue.mem:
  events: 4096
  flush.min_events: 8
  flush.timeout: 0.1s

############################# Output ############################################

# Configure what outputs to use when sending the data collected by mockbeat.
# Multiple outputs may NOT be enabled.
output:
  {% if console -%}
  console:
    {% for k, v in console.items() -%}
    {{ k }}: {{ v }}
    {% endfor -%}
  {%- endif %}

  {% if elasticsearch -%}
  elasticsearch:
    {% for k, v in elasticsearch.items() -%}
    {{ k }}: {{ v }}
    {% endfor -%}
  {%- endif %}

  # Redis as output
  # Options:
  # host, port: where Redis is listening on
  #redis:
  #  host: localhost
  #  port: 6379

  # File as output
  # Options
  # path: where to save the files
  # filename: name of the files
  # rotate_every_kb: maximum size of the files in path
  # number of files: maximum number of files in path
  {% if not (console or elasticsearch) -%}
  file:
    path: {{ output_file_path|default(beat.working_dir + "/output") }}
    filename: "{{ output_file_filename|default("mockbeat") }}"
    rotate_every_kb: 1000
    #number_of_files: 7
  {%- endif %}

#==================== Elasticsearch template setting ==========================
setup.template:
  fields: {{ fields|default("fields.yml") }}
  settings:
    index.number_of_shards: 1
    index.codec: best_compression
  name: {{ es_template_name }}
  pattern: {{ es_template_pattern }}
  overwrite: {{ template_overwrite|default("false") }}
  json:
    enabled: {{ template_json_enabled|default("false") }}
    path: {{ template_json_path }}
    name: {{ template_json_name }}

#================================ Logging =====================================

{% if metrics_period -%}
logging.metrics.period: {{ metrics_period }}
{%- endif %}

{% if keystore_path %}
#================================ keystore =====================================
keystore.path: {{keystore_path}}
{% endif %}

# vim: set ft=jinja:
