How to configure a filebeat running inside a docker container to get access logs from nginx running in another container?
Nginx access logs are not in default location so the paths must be configured.
I've tried using the following config without results:
filebeat.autodiscover:
providers:
- type: docker
hints.enabled: true
templates:
- condition:
contains:
docker.container.image: swag
config:
- module: nginx
access:
enabled: true
var.paths: [ "/config/log/nginx/access.log*" ]
error:
enabled: true
var.paths: [ "/config/log/nginx/error.log*" ]