Open vasiliyb opened 5 years ago
Support has been unresponsive for days... 👎
@vasiliyb I think this is tied to this issue: https://github.com/rancher/charts/issues/24#issuecomment-415692699 Could you try using a different mountdir than /opt/datadog-agent/run as specified in the issue?
cc @DylanLovesCoffee
@vasiliyb Could you create a volume and volumeMount to /var/log/pods
in your DD Daemonset and update us in the ticket of the result?
I fixed the failed to open log file "/var/log/pods/ (...)
error with the following configuration:
# In spec.template.spec.containers[0].volumeMounts.
- name: logpath
mountPath: /var/log/pods
- name: dockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
# In spec.template.spec.volumes.
- hostPath:
path: /var/log/pods
name: logpath
- hostPath:
path: /var/lib/docker/containers
name: dockercontainers
The problem is that the files in /var/log/pods/*/*/*.log
are actually symbolic links that point to /var/lib/docker/containers/*/*.log
, so mounting only /var/log/pods
is not enough.
I fixed the read-only file system
problem that occurs when attempting to mount the host path /opt/datadog-agent/run
by replacing /opt/datadog-agent/run
with /var/lib/datadog-agent/run
in spec.template.spec.volumes[].hostPath.path
(ref: https://github.com/DataDog/datadog-agent/issues/3370#issuecomment-487438501, https://github.com/rancher/charts/issues/24#issuecomment-415692699).
@jtrh thanks! worked perfectly.
Hi @vasiliyb
Thanks for submitting your issue and providing a solution.
We updated recently the datadog deamonset to include /var/lib/docker/containers
by default as well as updated the documentation, see:
Feel free to close the issue, if you think your problem is solved.
Cheers
How do i get logs from different file path which are written /opt/
Output of the info page (if this is a bug)
unable to provide the info, pods will not start
Describe what happened: Having problem with collecting logs from GKE containers. Followed https://app.datadoghq.com/logs/onboarding/container steps after which am seeing the following in the datadog-agent logs which are crashlooping:
Describe what you expected: datadog-agent pods starting fine
Steps to reproduce the issue:
Additional environment details (Operating System, Cloud provider, etc):
Latest GKE DaemonSet: