Skip to content

Fluent Log Issue

1. Xrap receive log issue

  • Xrap接收到的日志被切断成多条

分析原因为fluent对日志处理时,将日志超过1000字符时,会被切断成多条1000字符以内的日志送到xrap

  • 处理方法

通过拼接参数由fluent将切断的日志进行拼接后,再推送到XRAP/Loki

# 检查确认flows名称
kubectl get flows -n wimes-f130

# 修改指定flows
kubectl edit flows -n wimes-f130 xrap-f130
spec:
  filters:
  - concat:
      multiline_start_regexp: /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+\+\d{2}:\d{2}\|/
      separator: ''

image-20250610205339332