Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

vector-agent sources kubernetes_logs timezone invalid #20507

Closed
huisebug opened this issue May 17, 2024 · 1 comment
Closed

vector-agent sources kubernetes_logs timezone invalid #20507

huisebug opened this issue May 17, 2024 · 1 comment
Labels
type: bug A code related bug.

Comments

@huisebug
Copy link

A note for the community

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

I hope the time zone can be Asia/Shanghai, but the logs printed from the vector aggregator console and the data stored in the clickhouse are still in UTC world standard time. I tried the American/New York time zone but it still hasn't changed

Configuration

sources:
      kubernetes_logs:
        extra_namespace_label_selector: huisebug.io/logging-system=enabled
        timezone: Asia/Shanghai
        namespace_annotation_fields:
          namespace_labels: ""
        node_annotation_fields:
          node_labels: ""
        pod_annotation_fields:
          container_id: ""
          container_image: ""
          container_image_id: ""
          container_name: container_name
          pod_annotations: ""
          pod_ip: ""
          pod_ips: ""
          pod_labels: ""
          pod_name: pod_name
          pod_namespace: pod_namespace
          pod_node_name: ""
          pod_owner: ""
          pod_uid: ""
        type: kubernetes_logs
      vector_metrics:
        type: internal_metrics

Version

timberio/vector:0.38.0-distroless-libc

Debug Output

{"container_name":"nginx","file":"/var/log/pods/default_nginx-564d4f7d84-xp8cw_8ca2bfea-5915-4f95-be20-a5ee813314df/nginx/1.log","message":"10.10.1.0 - - [17/May/2024:10:56:34 +0800] \"GET / HTTP/1.1\" 304 0 \"-\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36\" \"192.168.137.1\"","pod_name":"nginx-564d4f7d84-xp8cw","pod_namespace":"default","source_type":"kubernetes_logs","stream":"stdout","timestamp":"2024-05-17T02:56:34.364711461Z"}

Example Data

No response

Additional Context

浣跨敤vectoragent--銆媣ector-aggregator--銆媍lickhouse

References

No response

@huisebug huisebug added the type: bug A code related bug. label May 17, 2024
@jszwedko
Copy link
Member

@huisebug The timezone config on sources just configures how Vector reads timestamps that are missing a timezone. Internally in Vector, all timestamps are recorded as UTC. I think what you want is to be able to configure the timezone that Vector writes the timestamps using. This is an outstanding feature request: #18158. I'll close this one in-lieu of the feature request. Feel free to follow along there are add additional thoughts.

@jszwedko jszwedko closed this as not planned Won't fix, can't repro, duplicate, stale May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A code related bug.
Projects
None yet
Development

No branches or pull requests

2 participants