mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 15:13:08 +00:00
Merge pull request #59103 from Random-Liu/upload-container-runtime-log
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Upload container runtime log to sd/es. I've verified this in my environment. My stackdriver has an extra `container-runtime` entry for node log, and it collects container runtime daemon log correctly. @yujuhong @feiskyer @crassirostris @piosz @kubernetes/sig-node-pr-reviews @kubernetes/sig-instrumentation-pr-reviews Signed-off-by: Lantao Liu <lantaol@google.com> **Release note**: ```release-note Container runtime daemon (e.g. dockerd) logs in GCE cluster will be uploaded to stackdriver and elasticsearch with tag `container-runtime` ```
This commit is contained in:
@@ -102,6 +102,7 @@ data:
|
||||
# Examples:
|
||||
# time="2016-02-04T06:51:03.053580605Z" level=info msg="GET /containers/json"
|
||||
# time="2016-02-04T07:53:57.505612354Z" level=error msg="HTTP Error" err="No such image: -f" statusCode=404
|
||||
# TODO(random-liu): Remove this after cri container runtime rolls out.
|
||||
<source>
|
||||
type tail
|
||||
format /^time="(?<time>[^)]*)" level=(?<severity>[^ ]*) msg="(?<message>[^"]*)"( err="(?<error>[^"]*)")?( statusCode=($<status_code>\d+))?/
|
||||
@@ -239,6 +240,8 @@ data:
|
||||
</source>
|
||||
|
||||
# Logs from systemd-journal for interesting services.
|
||||
# TODO(random-liu): Keep this for compatibility, remove this after
|
||||
# cri container runtime rolls out.
|
||||
<source>
|
||||
type systemd
|
||||
filters [{ "_SYSTEMD_UNIT": "docker.service" }]
|
||||
@@ -247,6 +250,14 @@ data:
|
||||
tag docker
|
||||
</source>
|
||||
|
||||
<source>
|
||||
type systemd
|
||||
filters [{ "_SYSTEMD_UNIT": "{{ container_runtime }}.service" }]
|
||||
pos_file /var/log/gcp-journald-container-runtime.pos
|
||||
read_from_head true
|
||||
tag container-runtime
|
||||
</source>
|
||||
|
||||
<source>
|
||||
type systemd
|
||||
filters [{ "_SYSTEMD_UNIT": "kubelet.service" }]
|
||||
@@ -387,7 +398,7 @@ data:
|
||||
num_threads 2
|
||||
</match>
|
||||
metadata:
|
||||
name: fluentd-gcp-config-v1.2.3
|
||||
name: fluentd-gcp-config-v1.2.4
|
||||
namespace: kube-system
|
||||
labels:
|
||||
addonmanager.kubernetes.io/mode: Reconcile
|
||||
|
@@ -123,4 +123,4 @@ spec:
|
||||
path: /usr/lib64
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: fluentd-gcp-config-v1.2.3
|
||||
name: fluentd-gcp-config-v1.2.4
|
||||
|
Reference in New Issue
Block a user