-
Notifications
You must be signed in to change notification settings - Fork 50
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
parse_klog always parse the timestamp as UTC timezone #471
Comments
Hi @Leo1003 ! Could you give an example log message including the timestamp? |
The following logs is generated from kubelet. The timestamp is based on the machine's timezone (Asia/Taipei UTC+8)
According to the docs the timezone settings should default to the local timezone. However, the parsed result is: { "file": "summary_sys_containers.go", "id": 5813, "level": "error", "line": 83, "message": "\"Failed to get system container stats\" err=\"failed to get cgroup stats for \\\"/system.slice/kubelet.service\\\": failed to get container info for \\\"/system.slice/kubelet.service\\\": unknown container \\\"/system.slice/kubelet.service\\\"\" containerName=\"/system.slice/kubelet.service\"", "timestamp": t'2023-10-11T10:11:03.249539Z' } The parsed timestamp is |
Perfect, thanks for sharing that! As a workaround you could try using the |
The logs outputs from kubelet are emitted with local timezone timestamp, however, the
parse_klog()
(and maybe alsoparse_glog()
) function always parses them as UTC timestamp. This leads to hours of time shifting in the parsed log.The text was updated successfully, but these errors were encountered: