Filebeat autodiscover for local log Docker driver

Hi, there, first post here.

Suppose this Filebeat autodiscover configuration for Docker containers:

filebeat.autodiscover:
  providers:
    - type: docker
      hints.enabled: true
      hints.default_config.enabled: false

This config works like a cham if using default Docker json-log driver, that is, it harvests the files from /var/lib/docker/containers/*/*-json.log.

Docker still uses the default json-log driver for backward compatibility, but recommends local log driver for performance and rotate features.

In practice, the logs change format and are moved from /var/lib/docker/containers/*/*-json.log to /var/lib/docker/containers/*/local-logs/container.log.

This can be configured changing hints.default_config to:

      hints.default_config:
        type: container
        paths:
          - /var/log/containers/${data.container.id}/local-log/container.log

This new file isn't in JSON format and isn't parsed.

Is it possible to use local log Docker driver with autodiscover?

Best regards,
Luís Sousa

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.