The documentation says to avoid harvesting symlinks when dialing with file rotation (link):
When dealing with file rotation, avoid harvesting symlinks. Instead use the paths setting to point to the original file, and specify a pattern that matches the file you want to harvest and all of its rotated files.
But at the same time in the section about kubernetes autodiscover symlink example given in path (link):
filebeat.autodiscover:
providers:
- type: kubernetes
templates:
- condition:
equals:
kubernetes.namespace: kube-system
config:
- type: container
paths:
- /var/log/containers/*-${data.kubernetes.container.id}.log
exclude_lines: ["^\\s+[\\-`('.|_]"] # drop asciiart lines
Symlinks in /var/log/containers*.log points to log files in /var/log/pods which are rotated by kubelet.
What is best practices? Is there documentation mistake?