提升Debian上Filebeat稳定性可从配置、资源、监控等方面入手,具体如下:
multiline参数处理多行日志,设置json.keys_under_root等参数优化JSON日志解析。queue.type设为persisted,并调整queue.max_bytes和flush.min_events,确保数据不丢失。ignore_older忽略旧文件,close_inactive关闭非活动文件,释放资源。bulk_max_size),选择高效输出插件(如Elasticsearch)并配置连接池。/etc/security/limits.conf,增加文件描述符限制。参考来源: