-
Notifications
You must be signed in to change notification settings - Fork 108
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
INFO: Collecting Logs on Bottlerocket AMI #136
Comments
FYI If you look at the manpage of
AKA you can use the following to get dmesg logs:
I hope this helps solve your problem |
We are facing a small issue on the EC2 nodes which are using Bottlerocket AMI. Can you also give a peace of advice or alternative solution how to achieve the result while using the Bottlerocket AMI? As the Support sent me over here :) We do have couple applications running in the EKS cluster which are statefulset types and are using csi provider to create EBS volumes. On those volumes we have also /data/logs folder and we are storing some more detailed logs there, which we split into multiple files based on cateogry. We need to retain this for security & audit purposes. Usually on non Bottlerocket OS this would be reachable on path like: This path doesn't exist in Bottlerocket directly but if i go As this our implementation are causing as to be AZ locked because of the EBS volume and i would like to get rid of this approach which was set up years ago i came to a conclusion: Does bottleRocket support a way how to externalize the access to this?
Doing option 3 i want to avoid as what if the vendor change and it would require a code level change which the developers may not like. |
To add one more piece of information: sudo sheltie /.bottlerocket/rootfs/var/lib/kubelet/pods/bc7dd655-aee3-4942-993e-bc3f53b6256b/volumes/kubernetes.io~csi/pvc-4553ea4f-92a6-4729-8ea4-685267ca85e8/mount/ Tihs is empty But on non bottlerocketOS i would see the same stuff as inside of sheltie and would be able to access what i need with fluenbit easily |
Bottlerocket log collection
No host logs on Bottlerocket
UPDATE: please see new workaround from community: #136 (comment)
The Bottlerocket AMIs are meant to be a very stripped down container OS. Consequently, there are fewer log types to collect.
I've reached out the bottlerocket team and they said that all logs should go to journald on Bottlerocket.
On Bottlerocket, the
/aws/containerinsights/Cluster_Name/host
will not be populated because/var/log/dmesg
,/var/log/secure
, and/var/log/messages
files do not exist on bottlerocket.dmesg logs can be obtained with
journalctl -k
orjournalctl --dmesg
:However, Fluent Bit appears to only be able to collect systemd unit journald logs. The docs say that it can filter by systemd unit file only: https://docs.fluentbit.io/manual/pipeline/inputs/systemd
And when I tried an input with no filters, no logs were collected:
Here's the contents of
/var/log
on my node:The logs in
aws-routed-eni
might be interesting to some users and could be collected with a Tail input: https://docs.fluentbit.io/manual/pipeline/inputs/tailNotes:
/var/log
, but its empty. I've reached out the bottlerocket team and they said that all logs should go to journald on Bottlerocket. As noted above, you can usejournalctl
to obtain them.Pod Logs will still be collected
Pod logs can still be collected without any change in experience.
Dataplane logs will still be collected
Kubelet and Containerd logs can still be collected without any change in experience.
The text was updated successfully, but these errors were encountered: