Open xiaopanggege opened 2 days ago
I think you have a fundamental issue here in that you're not handling the actual log format on disk which will be the kubelet format. This is unrelated to your application log format, first of all you must parse the kubelet format and then you can do your application log parsing.
Have a look at the incorrect parsers section here: https://chronosphere.io/learn/fluent-bit-kubernetes-filter/
I'd also caution not to debug via some other stack which may introduce some additional changes or concerns to cope with, instead use the stdout output to see the actual data as Fluent Bit is dealing with it. This will likely highlight things better to work with and once it is correct here then you can send it to the output, then any further issues you know are to do with that output processing it.
Bug Report
Describe the bug Because I didn't know that the built-in Java multiline parser couldn't match my k8s environment, I customized the Java multiline parser, but it seems to have no effect
To Reproduce
vim fluent-bit.yaml
Source: fluent-bit/templates/serviceaccount.yaml
apiVersion: v1 kind: ServiceAccount metadata: name: fluent-bit namespace: efk labels: helm.sh/chart: fluent-bit-0.46.0 app.kubernetes.io/name: fluent-bit app.kubernetes.io/instance: fluent-bit app.kubernetes.io/version: "3.0.0" app.kubernetes.io/managed-by: Helm
Source: fluent-bit/templates/configmap.yaml
apiVersion: v1 kind: ConfigMap metadata: name: fluent-bit namespace: efk labels: helm.sh/chart: fluent-bit-0.46.0 app.kubernetes.io/name: fluent-bit app.kubernetes.io/instance: fluent-bit app.kubernetes.io/version: "3.0.0" app.kubernetes.io/managed-by: Helm data: custom_parsers.conf: | [PARSER] Name docker_no_time Format json Time_Keep Off Time_Key time Time_Format %Y-%m-%dT%H:%M:%S.%L
fluent-bit.conf: | [SERVICE] Daemon Off Flush 1 Log_Level info Parsers_File /fluent-bit/etc/parsers.conf Parsers_File /fluent-bit/etc/conf/custom_parsers.conf HTTP_Server On HTTP_Listen 0.0.0.0 HTTP_Port 2020 Health_Check On