-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Adding inforamtion for CRI-O configuration and enhancing our manifest… #32151
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this! Keep in mind that in pure input
's configs providers' content is not available so we should structure the patterns accordingly.
Also I would consider adding a note regarding CRI-O in https://www.elastic.co/guide/en/beats/filebeat/master/running-on-kubernetes.html.
@@ -11,6 +11,8 @@ data: | |||
filebeat.inputs: | |||
- type: container | |||
paths: | |||
#Uncomment below line if you want to enable CRI-O based logs autodiscover | |||
#- /var/log/pods/${data.kubernetes.pod.uid}/${data.kubernetes.container.name}/*.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content like ${data.kubernetes.*}
is only available in configurations generated by the kubernetes
provider, template based or hint's based. Here the configuration is the container
input so the path should be sth like /var/log/pods/*/*/*.log
. Haven't test it so it should be safe to make a test to ensure it's working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any issue with /var/log/containers/*.log
when used cri-o?
/var/log/containers/*.log
is usually just a symlink of /var/log/pods/*/*/*.log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me test it.
If that is the case @tetianakravchenko then we dont need to do any changes at all. Not sure I was only following what we have in the code. Let me first test /var/log/pods/*/*/*.log
and we can sync
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tetianakravchenko You are correct, symlink it is.
So removed it from here, I like better the /var/log/containers/*.log as have no subfolders.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gizas do we then need this PR if the default path /var/log/containers/*.log
should work for different runtimes, including cri-o?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also /var/log/containers/*.log is symlink in containerd envs, checked it in docker.
On one hand our examples in doc show /var/log/pods/ and /var/lib/docker in each case. So we need to make sure that users have this info seperate per environment if they want to use actual links
Now the /var/log/containers/*.log is what we will propose in general, correct but I am not 100% sure that symlink is always the case in all envs. Just to be on safe side.
Does it make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On one hand our examples in doc show /var/log/pods/ and /var/lib/docker in each case
you mean /var/log/containers/
, instead of /var/log/pods/
?
Now the /var/log/containers/*.log is what we will propose in general, correct but I am not 100% sure that symlink is always the case in all envs. Just to be on safe side.
Does it make sense?
to be on safe side - fine, but in this PR is emphasized that for cri-o runtime must be used /var/log/pods/*
path, that is not correct and is misleading, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tetianakravchenko updated based on our discussion. Let me know if ok now?
It was in this PR: filebeat/docs/running-on-kubernetes.asciidoc @ChrsMark, is not it ok? |
This pull request is now in conflicts. Could you fix it? 🙏
|
…manifest… (elastic#32151)" This reverts commit c47ef26.
#32151) * [DOCS] Removed reference to the Stack GS (#32083) * [DOCS] Removed reference to the Stack GS (#32119) * Adding inforamtion for CRI-O configuration and enhancing our manifest comments * Adding CHANGELOG.asciidoc info * Adding CHANGELOG.next.asciidoc info * Keeping only containers path * Keeping only containers path * Keeping only containers path * Adding note * Adding note * Adding note * Adding note * Adding note * Update input-container.asciidoc * Update running-on-kubernetes.asciidoc * Fixing Conflicts * Fixing Conflicts * Removig other path references and kept only /var/log/containers/ * Removig other path references and kept only /var/log/containers/ * Adding generated files Co-authored-by: debadair <debadair@elastic.co>
… comments
What does this PR do?
This PR adds documentation reference for CRI-O paths in container input and also in our kubernetes manifests.
Comments added in our manifests to guide user to config CRI-O running environment
Why is it important?
https://github.com/elastic/sdh-beats/issues/2210
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs