{% if not skip_registry_config %}
filebeat.registry:
  path: {{ beat.working_dir + '/' }}{{ registry_home|default("registry")}}
  file_permissions: {{ registry_file_permissions|default("0600") }}
  {% if registry_migrate_file %}
  migrate_file: {{ beat.working_dir + '/' + registry_migrate_file }}
  {% endif %}
{%endif%}

filebeat.overwrite_pipelines: true

filebeat.config.modules:
  path: {{ beat.working_dir + '/modules.d/*.yml' }}

output.elasticsearch.hosts: ["{{ elasticsearch_url }}"]
output.elasticsearch.index: {{ index_name }}

setup.template.name: {{ index_name }}
setup.template.pattern: {{ index_name }}*

setup.kibana.host: {{ kibana_url }}

{% if kibana_path %}
setup.dashboards.directory: {{ kibana_path }}
{% endif %}

{% if ilm %}
setup.ilm:
  enabled: {{ ilm.enabled | default("auto") }}
  policy_name: libbeat-test-default-policy
  {% if ilm.pattern %}
  pattern: {{ ilm.pattern }}
  {% endif %}
  {% if ilm.rollover_alias %}
  rollover_alias: {{ ilm.rollover_alias }}
  {% endif %}
{% endif %}

