fluent / fluent-operator

Operate Fluent Bit and Fluentd in the Kubernetes way - Previously known as FluentBit Operator
Apache License 2.0
587 stars 250 forks source link

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

Open fhperuchi opened 9 months ago

fhperuchi commented 9 months ago

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