ubuntu

Ubuntu下Filebeat的性能调优有哪些技巧

小樊
44
2025-12-22 21:29:41
栏目: 智能运维

Ubuntu下Filebeat性能调优要点

一 系统与环境准备

二 输入与多行日志

三 队列与缓存策略

四 输出与网络优化

五 快速参考配置与验证

filebeat.inputs:
- type: log
  paths:
    - /var/log/*.log
  scan_frequency: 5s
  ignore_older: 2h
  close_inactive: 10s
  harvester_buffer_size: 40MiB
  max_bytes: 40KiB
  multiline.pattern: '^[[:space:]]'
  multiline.negate: true
  multiline.match: after
  multiline.max_lines: 200

queue:
  type: persisted
  spool:
    file:
      path: "${path.data}/spool.dat"
      size: 512MiB
      page_size: 16KiB
      prealloc: true
    write:
      buffer_size: 10MiB
      flush.timeout: 5s
      flush.events: 1024
      flush.codec: cbor
    read:
      flush.timeout: 0s

output.elasticsearch:
  hosts: ["es-node:9200"]
  worker: 2
  bulk_max_size: 15000
  flush_interval: 1s
  compression: true

monitoring:
  enabled: true
  elasticsearch:
    hosts: ["es-mon:9200"]

0
看了该问题的人还看了