forked from fluent/fluent-bit-kubernetes-logging
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Displaying unparsed log entries using kubectl apply -k base; kubectl rollout status daemonset fluent-bit; kubectl logs -f -l app.kubernetes.io/name=fluent-bit Issues like fluent#88 and fluent/fluent-bit#1902 (comment) indicate that depending on /var/log/containers symlinks cause quite a few issues. /var/log/pods/ is the path stated in https://github.com/kubernetes/kubernetes/blob/v1.22.0/pkg/kubelet/kuberuntime/kuberuntime_manager.go#L63 and I've verified on GKE cos-containerd, GKE ubuntu-dockerd and k3s that the path contains the actual files, not symliks. Also using /var/log/pods makes it trivial to exclude logs from any container named fluent-bit. Doing so reduces the risk of endless log loops.
- Loading branch information
Showing
7 changed files
with
36 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
[SERVICE] | ||
Flush 1 | ||
Log_Level info | ||
Log_Level ${LOG_LEVEL} | ||
Daemon off | ||
Parsers_File parsers.conf | ||
HTTP_Server On | ||
HTTP_Listen 0.0.0.0 | ||
HTTP_Port 2020 | ||
|
||
@INCLUDE input-kubernetes.conf | ||
@INCLUDE filter-kubernetes.conf | ||
@INCLUDE output-elasticsearch.conf | ||
#@INCLUDE filter-kubernetes.conf | ||
@INCLUDE outputs.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
[INPUT] | ||
Name tail | ||
Tag kube.* | ||
Path /var/log/containers/*.log | ||
Parser docker | ||
DB /var/log/flb_kube.db | ||
DB /var/run/fluent-bit/tail-positions.db | ||
Mem_Buf_Limit 5MB | ||
Skip_Long_Lines On | ||
Refresh_Interval 10 | ||
DB.locking true | ||
Path /var/log/pods/*/*/*.log | ||
Exclude_Path /var/log/pods/*/fluent-bit/*.log | ||
#Parser cri |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[OUTPUT] | ||
Name stdout | ||
Format json_lines | ||
json_date_key t | ||
json_date_format iso8601 | ||
# Name file | ||
# Path /var/run/fluent-bit | ||
# File file-output.txt |