can't scrape logs: /var/log empty
Morriz opened this issue · 3 comments
Hi, I use filebeat to scrape logs for elsticsearch indexing, but it finds nothing. When I look at /var/log
from inside a pod I see nothing. What am I missing?
What exactly do you want achieve here? If you are running it from a pod then you will get only logs from the pod. In most modern containers /var/log indeed will be empty because containers should log to stdout. Then you are able to see pod logs using kubectl logs <pod_name>
command
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
@lukaszo to close this issue: I needed to remount mountPath: /var/lib/docker/containers
to the correct hostpath (which is /dind/docker/containers
in case of dind, but is ususally /var/lib/docker/containers
), so filebeat could read the logs.
I would like to ask why deviate from the default in this case?