Files
starry-sdk-observability-demo/fluent-bit.conf
xkm 12433b4f31 update fluent-bit to 5.0
- fluent-bit 5.0 support tag by url
- update readme.md
2026-05-05 21:28:04 +08:00

63 lines
1.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[SERVICE]
Flush 1
Log_Level info
Parsers_File parsers.conf
# 方便调试 Fluent Bit 自身状态;不要对公网暴露
HTTP_Server On
HTTP_Listen 0.0.0.0
HTTP_Port 2020
# 可选:给 Fluent Bit 文件缓冲目录,配合 compose 里的 volume
storage.path /buffers
storage.sync normal
storage.checksum off
storage.backlog.mem_limit 64M
[INPUT]
Name opentelemetry
Listen 0.0.0.0
Port 4318
# OTLP/HTTP 通常期望 200Fluent Bit 默认是 201
Successful_Response_Code 200
Buffer_Chunk_Size 1M
Buffer_Max_Size 10M
Threaded On
# Python SDK 发来的 metrics -> VictoriaMetrics remote_write
[OUTPUT]
Name prometheus_remote_write
Match v1_metrics
Host victoriametrics
Port 8428
Uri /api/v1/write
# 可选公共 label便于区分来源
Add_Label otel_pipeline fluent-bit
Workers 2
# Python SDK 发来的 logs -> vlagent -> VictoriaLogs
[OUTPUT]
Name opentelemetry
Match v1_logs
Host victorialogs-1
Port 9428
Logs_Uri /insert/opentelemetry/v1/logs
# VictoriaLogs 摄取日志时的字段映射。
# Python OTel log body 通常能被自动处理;这里保留多个候选字段更稳。
Header VL-Msg-Field body,Body,message,msg,log,_msg
# 只把低基数字段作为 stream fields避免 path、status_code 这类字段爆炸。
Header VL-Stream-Fields service.name,service.namespace,service.version,deployment.environment,host.name
Compress gzip
Workers 2
[OUTPUT]
Name stdout
Match *