Filebeat输出Kafka配置

filebeat启动

  1. 前台启动:
bash 复制代码
/usr/local/fb/filebeat -e -c /usr/local/fb/filebeat.yml
  1. 后台启动:
bash 复制代码
nohup /usr/local/fb/filebeat -e -c /usr/local/fb/filebeat.yml > /dev/null 2>&1 &

input 配置 && output配置

  1. input配置
yaml 复制代码
- type: log
  enabled: true
  paths:
    - /var/fb/log/pe.log
  fields:
    topic: "wlinfo"
  json.keys_under_root: true
  json.overwrite_keys: true
  1. output配置
yaml 复制代码
output.kafka:
  hosts: ["192.168.110.49:9092"]
  topic: '%{[fields.topic]}'
  required_acks: 1
  compression: gzip
  max_message_bytes: 1000000
  max_retry: 3
  timeout: 30s
  1. 启动校验
    使用 filebeat test config 和 filebeat test output 命令验证配置,确保事件结构正确。可以先用 filebeat test config 看看是否能通过配置检查。
相关推荐
ALex_zry14 小时前
Redis Cluster 分布式缓存架构设计与实践
redis·分布式·缓存
为什么不问问神奇的海螺呢丶16 小时前
n9e categraf rabbitmq监控配置
分布式·rabbitmq·ruby
TTBIGDATA20 小时前
【Atlas】Atlas Hook 消费 Kafka 报错:GroupAuthorizationException
hadoop·分布式·kafka·ambari·hdp·linq·ranger
m0_687399841 天前
telnet localhost 15672 RabbitMQ “Connection refused“ 错误表示目标主机拒绝了连接请求。
分布式·rabbitmq
indexsunny1 天前
互联网大厂Java面试实战:微服务与Spring生态技术解析
java·spring boot·redis·kafka·mybatis·hibernate·microservices
陌上丨1 天前
生产环境分布式锁的常见问题和解决方案有哪些?
分布式
新新学长搞科研1 天前
【智慧城市专题IEEE会议】第六届物联网与智慧城市国际学术会议(IoTSC 2026)
人工智能·分布式·科技·物联网·云计算·智慧城市·学术会议
泡泡以安1 天前
Scrapy分布式爬虫调度器架构设计说明
分布式·爬虫·scrapy·调度器
编程彩机1 天前
互联网大厂Java面试:从Spring Boot到分布式事务的技术场景解析
spring boot·kafka·分布式事务·微服务架构·java面试·技术解析
没有bug.的程序员1 天前
RocketMQ 与 Kafka 深度对垒:分布式消息引擎内核、事务金融级实战与高可用演进指南
java·分布式·kafka·rocketmq·分布式消息·引擎内核·事务金融