Fluentbit GKE is throwing errors while parsing logs. Sharing the sample log line.
Failed to parse time (2023-07-07T09:52:42): parsing time "2023-07-07T09:52:42" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "Z07:00"
GKE version: 1.23.17-gke.2000
Hello @aakashjhawar,
Welcome to Google Cloud Community!
The error message you posted indicates a parsing issue when trying to convert the time string "2023-07-07T09:52:42" into a specific time format. It states that it cannot parse the empty string (represented as "") as "Z07:00".
The format string "2006-01-02T15:04:05Z07:00" represents a specific layout for parsing and formatting time. The "Z07:00" part is used to indicate the time zone offset in the format "+hh:mm" (e.g., "+03:00" for UTC+3).
However, the time string you provided, "2023-07-07T09:52:42," does not contain a time zone offset (represented by "Z07:00"), which is causing the parsing error.
If you remove "Z07:00" from the format string, the time string "2023-07-07T09:52:42" will be parsed without the timzone offset. Parsing error will be eliminated from your logs but the time value result won't have an associated timezone.
Thanks