Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collector Helm chart: File collector never collects any logs #754

Closed
agronholm opened this issue Apr 20, 2023 · 3 comments
Closed

Collector Helm chart: File collector never collects any logs #754

agronholm opened this issue Apr 20, 2023 · 3 comments
Labels
chart:collector Issue related to opentelemetry-collector helm chart

Comments

@agronholm
Copy link

The default configuration, when log collection is enabled, never collects any logs because the include/exclude paths are wrong. The host file system (where the logs are) is mounted at /hostfs, so these paths also need to start with that, otherwise nothing is ever collected.

@TylerHelmuth TylerHelmuth added the chart:collector Issue related to opentelemetry-collector helm chart label Apr 20, 2023
@TylerHelmuth
Copy link
Member

@agronholm the preset works fine for me to collect logs from /var/log/pods/*/*/*.log. Can you describe more about your setup.

@agronholm
Copy link
Author

I see now what the issue is. The logsCollection.enabled: true preset is what adds the correct mount for /var/log/pods. I could not use the preset because I had JSON logs that needed to be parsed, and there is no way to add your own configuration on top of the default filelog configuration, so only way to accomplish that was to disable the preset and manually configure the filelog receiver by copying its configuration from the preset to my values.yaml and adding the appropriate operators. That volume mount was the missing piece then.

@agronholm agronholm closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2023
@TylerHelmuth
Copy link
Member

@agronholm you should be able to add/update the filelogreceiver configuration created by the preset, you only can't remove content. Any configuration you add to .Values.config will be applied on top of the preset configuration. You would still have to add the volume mount yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart:collector Issue related to opentelemetry-collector helm chart
Projects
None yet
Development

No branches or pull requests

2 participants