-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
parsers: Add containerd log parser #873
Conversation
This could be improved by doing something for multi-line messages (P/F?), UTF-8?, other? |
Signed-off-by: Karl Skewes <[email protected]>
@kskewes Containerd format appears to be the same as CRI-O? The current fluent-bit crio parser does not support the tag as a dedicated field, as the CRI log format changed a month after it was merged. Please see #876 with an identical goal. I wonder if the name of crio parser should be altered? It appears that original CRI-O example logs looked like this:
Since that time, they have been revised (note the
For reference, I am looking at this file: fluentd-es-configmap.yaml The current crio parser uses this regex:
You have this proposed this regex in #873 :
In #876 the regex proposal is:
If you look at the regex fluentd uses here Line 128 it is currently:
Can you speak to which would best meet your understanding, use case, and experience? |
Timing with #876 was uncanny. Good work putting all that together. I found.
Be nice to just use one for kubernetes if all runtime are in agreement now. |
So how about:
|
AFAICT there is no documentation or formal spec, but this is kubernetes's own golang log parser that is the source of truth: There is an unused AFAICT these are the two places logs are written:
Even if I don't see any examples actively using the
I think that's just for the future. If we want to be able to stitch multiple partials back into one multi-line string, I think regex is probably not the way and we'll need to lean on C or golang implementation, preferably maintained upstream by the CRI people (sig-node). |
@kskewes Both ContainerD and CRI-O implements the same Container Runtime Interface (CRI). So I think only one parser is needed for this. |
@jlpettersson Thanks. Is there a better name for this logging format that implies both? |
We could call it |
new PR is suggested, you can reference this one. |
Sure, will do. Thanks for quick response and thanks to Steven as well. |
See fluent#876 and fluent#873 Signed-off-by: Steve Coffman <[email protected]>
See #876 (comment) I made a new PR #881 that unified this discussion and the feedback from @chlunde |
Thanks! Closing. |
Thank you so much as well! There's still more work to support multi-line with the new
|
* Support CRI-O and containerd See #876 and #873 Signed-off-by: Steve Coffman <[email protected]> * Fix based on @kskewes from #881 Signed-off-by: Steve Coffman <[email protected]>
Signed-off-by: Youssef Rizkalla <[email protected]> Signed-off-by: Youssef Rizkalla <[email protected]>
Kubernetes 1.11 with Containerd runtime.
Example Fluent-bit log line on disk:
Example Elasticsearch JSON document: