centos

如何提高Filebeat在CentOS上的日志处理速度

小樊
44
2025-12-15 13:19:54
栏目: 智能运维

提升 Filebeat 在 CentOS 上的日志处理速度

一 核心原则与瓶颈定位

二 输入与采集层优化

三 队列与内存策略

四 输出与网络层优化

五 系统与部署实践

六 示例配置片段

# filebeat.yml 示例(按实际环境逐步调大数值并压测)
filebeat.inputs:
- type: filestream
  paths:
    - /var/log/*.log
  max_concurrent_files: 10
  ignore_older: 24h
  scan_frequency: 5s
  harvester_buffer_size: 32KB
  close_inactive: 5m
  multiline.pattern: '^\d{4}-\d{2}-\d{2}'
  multiline.negate: true
  multiline.match: after

queue:
  type: persisted
  max_bytes: 1GB
  flush.min_events: 2048
  flush_interval: 1s

output.elasticsearch:
  hosts: ["http://es-node:9200"]
  worker: 3
  bulk_max_size: 10000
  flush_interval: 1s
  compression: true
  # network.tcp.send_buffer_size: 1MB

processors:
  - drop_fields:
      fields: ["agent.ephemeral_id", "agent.id", "agent.type", "agent.version", "ecs.version"]
      ignore_missing: true

0
看了该问题的人还看了