Перейти к основному содержимому

Fluent Bit

Prod Only

Fluent Bit is not deployed in the dev environment. It runs in production only, where it ships container logs to VictoriaLogs. In dev, use kubectl logs to access container output directly.

Fluent Bit is the log collection agent that ships container logs from every node in the cluster to VictoriaLogs. It runs as a DaemonSet — one pod per node — and processes logs automatically with no per-service configuration needed.


Connection Details

PropertyValue
KindDaemonSet (one pod per node)
Namespacemonitoring
Metrics port2020
ChartFluent Bit v0.57.2
ArgoCD sync wave4 (after VictoriaLogs)
OutputVictoriaLogs at victoria-logs.monitoring.svc.cluster.local:9428

How Logs Flow

Your app writes to stdout/stderr
|
v
containerd writes to /var/log/containers/*.log
|
v
Fluent Bit (DaemonSet) tails the log files
|
v
Kubernetes metadata enriched (namespace, pod, container name)
|
v
JSON parsing extracts structured fields from message
|
v
VictoriaLogs receives and indexes the enriched record
к сведению

This happens automatically for every container. You do not need to configure anything — just write to stdout.


What Fluent Bit Does

  1. Tails container log files from /var/log/containers/*.log
  2. Parses CRI/containerd log format
  3. Enriches with Kubernetes metadata (namespace, pod name, container name) via the K8s API
  4. Extracts structured JSON from the message field (if your app logs JSON)
  5. Ships to VictoriaLogs via HTTP as JSON lines

Key settings

SettingValue
Input refresh interval10 seconds
Memory buffer limit5 MB per input
Skip long linesYes
Retry limit3
Output formatjson_lines

Debugging

Check DaemonSet status

kubectl get ds -n monitoring -l app.kubernetes.io/name=fluent-bit

View Fluent Bit logs

kubectl logs -n monitoring -l app.kubernetes.io/name=fluent-bit --tail=50

Verify logs reach VictoriaLogs

Open the prod VictoriaLogs UI at /select/vmui and run * — if results appear, the pipeline is working.

Common issues

SymptomLikely CauseFix
No logs in VictoriaLogsFluent Bit pod not running or VictoriaLogs downCheck both DaemonSet and VictoriaLogs pod status
Missing namespace metadataK8s API unreachable from Fluent Bit podCheck ServiceAccount permissions and network policies
Logs delayedMemory buffer fullCheck Fluent Bit metrics on port 2020

What's next: See the Logs Guide for how to query logs in VictoriaLogs.