ELK+filebeat+kafka

复制代码
nohup ./filebeat -e -c filebeat.yml > filebeat.out &

tail -f filebeat.out

cd /etc/logstash/conf.d
vim kafka.conf


input {
  kafka {
    bootstrap_servers => "192.168.233.10:9092,192.168.233.20:9092,192.168.233.30:9092"
    topics => "nginx"
    type => "nginx_kafka"
    codec => "json"
    auto_offset_reset => "earliest"
    decorate_events => true
  }
}

output {
  if "nginx" in [tags] {
    elasticsearch {
       hosts => ["192.168.233.12:9200","192.168.233.13:9200"]
       index => "%{[fields][service_name]-%{+YYYY.MM.dd}}"
    }
  }
}

wq

codec => "json" 解析json格式的代码 auto_offset_reset => "earliest" 从头拉去,latest decorate_events => true 传递给es实例中的信息包含kafka的属性数据

test2

相关推荐
喂完待续9 小时前
Apache Hudi:数据湖的实时革命
大数据·数据仓库·分布式·架构·apache·数据库架构
yh云想18 小时前
《从入门到精通:Kafka核心原理全解析》
分布式·kafka
武子康19 小时前
大数据-70 Kafka 日志清理:删除、压缩及混合模式最佳实践
大数据·后端·kafka
ModelWhale1 天前
“大模型”技术专栏 | 浅谈基于 Kubernetes 的 LLM 分布式推理框架架构:概览
分布式·kubernetes·大模型
愿天堂没有C++1 天前
C++——分布式
分布式
UPToZ1 天前
【Docker】搭建一个高性能的分布式对象存储服务 - MinIO
分布式·docker·容器
前端世界1 天前
鸿蒙任务调度机制深度解析:优先级、时间片、多核与分布式的流畅秘密
分布式·华为·harmonyos
A尘埃1 天前
金融项目高可用分布式TCC-Transaction(开源框架)
分布式·金融·开源
夜影风2 天前
RabbitMQ核心架构与应用
分布式·架构·rabbitmq
花酒锄作田2 天前
Nginx反向代理Kafka集群
nginx·kafka