Skip to content

我的ilogtail采集的时间不准确 #789

@jesssecat

Description

@jesssecat

hi,我是新使用ilogtail组件。
配置文件如下:
enable: true
inputs:

  • Type: service_docker_stdout
    Stderr: false
    Stdout: true
    K8sNamespaceRegex: "^(venv-su)$"
    K8sContainerRegex: "tag-management-api"
    IncludeK8sLabel:
    app: tag-management-api
    processors:
  • Type: processor_regex
    SourceKey: content
    Regex: (\d*-\d*-\d*)\s(.*)
    Keys:
    • time
    • msg
      flushers:
  • Type: flusher_stdout
    OnlyStdout: true

输出的日志:
2023-04-13 23:21:32 {"time":"2023-04-13T15:21:29.442983449Z","source":"stdout","container_name":"tag-management-api","pod_name":"tag-management-api-56cdf55967-l2lpx","namespace":"venv-su","pod_uid":"9eaadd9f-c090-4706-8e5b-25d27bdfc968","container_ip":"172.20.76.87","image_name":"XXXX/repository/docker-private/application/artificial-intelligence-platform/tag-management-api:20230320-100030-r14274","time":"2023-04-13","msg":"23:21:29.442 DEBUG c.u.d.t.m.m.p.T.queryAll:137 - <== Total: 29","time":"1681399290"}
"time":"2023-04-13T15:21:29.442983449Z" 时间不准确,相差8个小时
time":"1681399290" 是准确的,怀疑是不是内部有时区的转换
排查了主机、k8s、容器内部都是时间和时区正确的,请问是否有其他的方案,不胜感激

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions