Skip to content

Commit 4ce160b

Browse files
committed
Update documentation to use partial_cri mode
We can also handle with regexp mode for CRI-O log format, but I think that it is reasonable to add CRI-O handling mode on this plugin. Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent cb96cc7 commit 4ce160b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ Handle containerd/cri in Kubernetes.
196196
path /var/log/containers/*.log
197197
<parse>
198198
@type regexp
199-
expression /^(?<timestamp>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z) (?<output>\w+) (?<partial_flag>[FP]) (?<message>.+)$/
199+
expression /^(?<time>[^ ]+) (?<stream>stdout|stderr) (?<logtag>[^ ]*) (?<message>.*)$/
200+
time_format %Y-%m-%dT%H:%M:%S.%L%z
200201
</parse>
201202
tag k8s
202203
@label @CONCAT
@@ -206,8 +207,9 @@ Handle containerd/cri in Kubernetes.
206207
<filter k8s>
207208
@type concat
208209
key message
209-
partial_key partial_flag
210-
partial_value P
210+
use_partial_cri_logtag true
211+
partial_cri_logtag_key logtag
212+
partial_cri_stream_key stream
211213
</filter>
212214
<match k8s>
213215
@type relabel

0 commit comments

Comments
 (0)