以下是CentOS系統中Filebeat的性能調優方法:
filestream
輸入類型(Filebeat 7.0+),合理設置scan_frequency
、ignore_older
、max_file_size
等參數,精確監控文件路徑,減少不必要的文件掃描。queue.type
設為persisted
,調整queue.max_bytes
和flush.min_events
,優化內存與磁盤隊列性能。bulk_max_size
,提高數據批量發送效率,減少網絡請求次數。harvester.buffer_size
、harvester.max_bytes
,合理設置CPU使用限制,避免資源過度占用。/etc/security/limits.conf
,增加Filebeat的文件描述符等資源限制。grok
、json
解析,直接發送原始日志。