-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Hello.
I am not sure, that this is bug or feature or problem somewhere else, but I discovered, that FluentBit moving with timestamp, see this examples:
Example #1:
Raw record (exact line from log file):
2022-09-07T11:52:55.505530838Z stdout F [2022-09-07 11:52:55] Working on ADDED configmap monitoring/prometheus-stack-kube-prom-grafana-overview
FluentBit processing (processed line on FluentBit output, CSV format):
1662551575.505530834,
"[2022-09-07 11:52:55] Working on ADDED configmap monitoring/prometheus-stack-kube-prom-grafana-overview",
"stdout","F",
{"labels"=>
{"pod-template-hash"=>"69f7c847f7",
"app_kubernetes_io/name"=>"grafana",
"app_kubernetes_io/instance"=>"prometheus-stack"},
"namespace_name"=>"monitoring",
"pod_id"=>"3947599e-6663-4619-aa25-3c779c39edae",
"container_name"=>"grafana-sc-dashboard",
"host"=>"ip-XX-XX-XX-XX.eu-central-1.compute.internal",
"container_hash"=>...common.cdn.repositories..../kiwigrid/k8s-sidecar@sha256:1f025ae37b7b20d63bffd179e5e6f972039dd53d9646388c0a8c456229c7bbcb,
"docker_id"=>"c1f7296f593eeff90a87d19c555490a285cca4cfd0c69dd060d789b229d3b7cd",
"container_image"=>"...common.cdn.repositories..../kiwigrid/k8s-sidecar:1.15.6",
"pod_name"=>"prometheus-stack-grafana-69f7c847f7-rk2bc"},
"2022-09-07T11:52:55.505530838Z"
Jump is 4 fractional seconds in the future.
Example #2:
Raw record:
2022-09-07T11:52:55.505561119Z stdout F [2022-09-07 11:52:55] Found 'data' on configmap
FluentBit processing:
1662551575.505561113,
"[2022-09-07 11:52:55] Found 'data' on configmap",
"stdout","F",
{"labels"=>
{"pod-template-hash"=>"69f7c847f7",
"app_kubernetes_io/name"=>"grafana",
"app_kubernetes_io/instance"=>"prometheus-stack"},
"namespace_name"=>"monitoring",
"pod_id"=>"3947599e-6663-4619-aa25-3c779c39edae",
"container_name"=>"grafana-sc-dashboard",
"host"=>"ip-XX-XX-XX-XX.eu-central-1.compute.internal",
"container_hash"=>...common.cdn.repositories..../kiwigrid/k8s-sidecar@sha256:1f025ae37b7b20d63bffd179e5e6f972039dd53d9646388c0a8c456229c7bbcb,
"docker_id"=>"c1f7296f593eeff90a87d19c555490a285cca4cfd0c69dd060d789b229d3b7cd",
"container_image"=>"...common.cdn.repositories..../kiwigrid/k8s-sidecar:1.15.6",
"pod_name"=>"prometheus-stack-grafana-69f7c847f7-rk2bc"},
"2022-09-07T11:52:55.505561119Z"
Jump is 6 fractional seconds in the future.
Example #3:
Raw record:
2022-09-07T11:52:55.505566066Z stdout F [2022-09-07 11:52:55] Writing grafana-overview.json
FluentBit processing:
1662551575.505566120,
"[2022-09-07 11:52:55] Writing grafana-overview.json",
"stdout","F",
{"labels"=>
{"pod-template-hash"=>"69f7c847f7",
"app_kubernetes_io/name"=>"grafana",
"app_kubernetes_io/instance"=>"prometheus-stack"},
"namespace_name"=>"monitoring",
"pod_id"=>"3947599e-6663-4619-aa25-3c779c39edae",
"container_name"=>"grafana-sc-dashboard",
"host"=>"ip-XX-XX-XX-XX.eu-central-1.compute.internal",
"container_hash"=>...common.cdn.repositories..../kiwigrid/k8s-sidecar@sha256:1f025ae37b7b20d63bffd179e5e6f972039dd53d9646388c0a8c456229c7bbcb,
"docker_id"=>"c1f7296f593eeff90a87d19c555490a285cca4cfd0c69dd060d789b229d3b7cd",
"container_image"=>"...common.cdn.repositories..../kiwigrid/k8s-sidecar:1.15.6",
"pod_name"=>"prometheus-stack-grafana-69f7c847f7-rk2bc"},
"2022-09-07T11:52:55.505566066Z"
Jump is 54 fractional seconds in the past.
Expected behavior
FluentBit will not change timestamp fractional seconds.
Your Environment
- Version used: 1.9.5 / 1.9.7
- Configuration: docker image
fluent/fluent-bit
on containerd - Environment name and version (e.g. Kubernetes? What version?): Kubernetes 1.24.3
- Server type and version: AWS c5.xlarge (CPU: 4, Memory: 8GB)
- Operating System and version:
gardenlinux v: 576.11.0
(Debian 11 derivate) - Filters:
- lua
- kubernetes
- Plugins:
- systemd
- tail
- opensearch
Additional context
When you have few log records per seconds, this probably not hit you, but when you have million and above log records from exact pods, output is unusable, you need fractional seconds scale. In this scenario records are mixed over time due to moved fractional seconds from (for me) unknown reason.
I wrote small script to generate marked lines and from output it seems, that ordering isnt correct:
Have we something set wrong on our side? If yes, can you please pointing me to the right direction? Is this really bug?
Thank you!