grafana / k8s-monitoring-helm

Apache License 2.0
217 stars 86 forks source link

Request: Add dockercontainers mount option to value file under grafana-agent-logs #309

Closed BitKickerBHS closed 10 months ago

BitKickerBHS commented 10 months ago

I was not seeing any pod logs just the error level=error msg="error getting os stat" until I added dockercontainers mount option. Would it be possible to add dockercontainers mount option to the value file?

> grafana-agent-logs:
>   agent:
>     configMap:
>       create: false
>     mounts:
>       varlog: true
>       dockercontainers: true
petewall commented 10 months ago

Quick question, what kind of Kubernetes cluster are you running?

BitKickerBHS commented 10 months ago

Running Rancher RKE, v1.25.13

Andrii-Khodyriev commented 10 months ago

``I have exactly the same problem

Log example : ts=2023-12-26T20:23:33.462127486Z level=error msg="error getting os stat" component=local.file_match.pod_logs path=/var/log/pods/prod_simulation-assignment-797d7f7d85-hdnfn_ce3f8946-0fe9-44c4-9ffb-7f28b51ce39f/simulation-assignment-service/0.log err="stat /var/log/pods/prod_simulation-assignment-797d7f7d85-hdnfn_ce3f8946-0fe9-44c4-9ffb-7f28b51ce39f/simulation-assignment-service/0.log: no such file or directory"

Solution: Exactly the same as the Author's added the following:

grafana-agent-logs:
  agent:
    configMap: 
      create: false
    mounts:
      varlog: true
      dockercontainers: true