help request: Pods logs from specific namespace are not being populated with `kubernetes.*` fields by fluent-bit

Đang mở
#1,057 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
helm, kubernetes
Lĩnh vực
observability-sre

Hướng nghiên cứu

Bắt đầu với values.yaml và cấu hình Helm chart cho bộ lọc Kubernetes, sử dụng các thiết lập containerd và stdout được cung cấp. Tái hiện sự khác biệt giữa các namespace addons và artifactory, sau đó kiểm tra cách metadata được trích xuất cho từng đường dẫn log của container và xác minh rằng các log bị ảnh hưởng nhận được các trường kubernetes.*.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Describe the issue

I am using only these non-default configurations on values.yaml:

containerRuntime: containerd
Kubernetes: true
fluentbit
  output:
    stdout:
      enable: true

For all the namespace I get logs enriched with kubernetes.* fields:

[48] kube.var.log.containers.ingress-nginx-internal-controller-5b7857885c-srqcn_addons_controller-f808c3c123784b56333c9e45effd2b9e7515ef3dc3179aa87484cbcbeb3716c5.log:
[
    [1706971359.539064371, {}],
    {
        "logtag"=>"F",
        "time"=>"2024-02-03T14:42:39.539064371Z",
        "log"=>"10.47.150.35 - - [03/Feb/2024:14:42:39 +0000] "POST /api/13/envelope/ HTTP/1.1" 403 61 "-" "sentry.python/1.34.0" 1314 0.000 [sentry-sentry-relay-3000] [] 10.47.171.33:3000 61 0.001 403 899db327f37daa7143815424cfa58c80",
        "kubernetes"=>{
          "pod_name"=>"ingress-nginx-internal-controller-5b7857885c-srqcn",
          "namespace_name"=>"addons",
          "container_name"=>"controller",
          "docker_id"=>"f808c3c123784b56333c9e45effd2b9e7515ef3dc3179aa87484cbcbeb3716c5",
          "container_image"=>"sha256:311f90a3747fd333f687bc8ea3a1bdaa7f19aec377adedcefa818d241ee514f1"
        }
    }
]

But for the artifactory namespace pod I have here, I do not have kubernetes.* fields populated:

[0] kube.var.log.containers.artifactory-0_artifactory_jfconnect-ed9b6aee250c7de688eeeb8b3d7ecaeac45227f9e90d1c378660832ef0bbe81e.log:
[
    [1707135761.511397430, {}],
    {
        "time"=>"2024-02-05T12:22:41.511397430Z",
        "logtag"=>"F",
        "log"=>"2024-02-05T12:22:41.511Z [jfcon] [INFO ] [2a08bef3231d2e94] [archival_service.go:141       ] [main                ] - Archival - should execute? [false] [archival_service]"
    }
]

One detail is that artifactory logs has colors on some logs parts, and others do not have it. Example (green and purple colors):
image

Could you help, please?

How did you install fluent operator?

Via Helm Chart from master branch only changing to contained containerRuntime and sending logs to stdout output.

Additional context

No response

Ngôn ngữ chính
Go
Star
689
Fork
333
Merge trung bình
2 ngày 6 giờ
Pull request đã merge (30 ngày)
43

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fluent/fluent-operator

Tất cả issue của fluent/fluent-operator

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.