diff --git a/templates/filebeat.yml.j2 b/templates/filebeat.yml.j2 index cea2d1c61ebb579bb289bca15f52f6cf342cf9ed..18856264d0678ccaf5695152640491657bd152ba 100644 --- a/templates/filebeat.yml.j2 +++ b/templates/filebeat.yml.j2 @@ -17,13 +17,14 @@ filebeat.autodiscover: providers: - type: docker hints.enabled: true -{% if docker_userns_remap %} hints.default_config: type: container paths: +{% if docker_userns_remap %} - /var/lib/docker/{{ dockremap_subuid | default("*") }}.{{ dockremap_subgid | default("*") }}/containers/${data.container.id}/*-json.log +{% else %} + - /var/lib/docker/containers/${data.container.id}/*-json.log {% endif %} - {% endif %} filebeat.inputs: