mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Upload containerd logs to stackdriver
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
parent
05836353a1
commit
c229c78af7
@ -1492,7 +1492,7 @@ function Install_Containerd {
|
||||
# Register and start containerd service.
|
||||
function Start_Containerd {
|
||||
Log-Output "Creating containerd service"
|
||||
containerd.exe --register-service
|
||||
containerd.exe --register-service --log-file ${env:LOGS_DIR}/containerd.log
|
||||
Log-Output "Starting containerd service"
|
||||
Start-Service containerd
|
||||
}
|
||||
@ -1712,6 +1712,20 @@ $FLUENTD_CONFIG = @'
|
||||
tag kube-proxy
|
||||
</source>
|
||||
|
||||
# Example:
|
||||
# time="2019-12-10T21:27:59.836946700Z" level=info msg="loading plugin \"io.containerd.grpc.v1.cri\"..." type=io.containerd.grpc.v1
|
||||
<source>
|
||||
@type tail
|
||||
format multiline
|
||||
multiline_flush_interval 5s
|
||||
format_firstline /^time=/
|
||||
format1 /^time="(?<time>[^ ]*)" level=(?<severity>\w*) (?<message>.*)/
|
||||
time_format %Y-%m-%dT%H:%M:%S.%N%z
|
||||
path /etc/kubernetes/logs/containerd.log
|
||||
pos_file /etc/kubernetes/logs/gcp-containerd.log.pos
|
||||
tag container-runtime
|
||||
</source>
|
||||
|
||||
<match reform.**>
|
||||
@type record_reformer
|
||||
enable_ruby true
|
||||
|
Loading…
Reference in New Issue
Block a user