该压缩包内包含以下文件:

1.install_java.txt 配置java环境,logstash使用

2.es.txt 三节点的es集群

3.filebeat.txt 获取日志输出到kafka集群

4.install_zookeeper_cluster.txt zk集群

5.install_kafka_cluster.txt kafka集群

6.logstash.txt

7.kibana.txt

文件下载地址:https://files.cnblogs.com/files/sanduzxcvbnm/部署文件.zip

扩展:

手动创建kafka消息主题:

/opt/kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic apache

filebeat.yml文件设置

filebeat.inputs:
- type: log
enabled: true
paths:
- /etc/filebeat/access.log
output.kafka:
codec.format:
string: '%{[@timestamp]} %{[message]}'
hosts: ["192.168.43.192:9092"]
topic: apache
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
max_message_bytes: 1000000

注意codec.format指令的使用-这是为了确保正确提取message和timestamp字段。 否则,这些行将以JSON发送到Kafka.

logstash使用的conf文件内容,apache.conf:

input {
kafka {
bootstrap_servers => "localhost:9092"
topics => "apache"
}
} filter {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}" }
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
geoip {
source => "clientip"
}
} output {
elasticsearch {
hosts => ["192.168.43.220:9200"]
}

logstash指定文件启动:./bin/logstash -f apache.conf

最新文章

  1. Linux下百度云盘报 获取bdstoken失败
  2. html5,表单的综合案例
  3. lightoj1080 线段树
  4. linux安全体系
  5. python学习小结2:if和while控制语句
  6. Ubuntu 12.04 中安装和配置 Java JDK
  7. ASP.NET MVC 4 让数据库自动迁移
  8. Please check if the Publishing Tools on the server (System/PublishingTools) are started.
  9. log4j2日志
  10. redis的删除库应用(linux)
  11. Android数据存储之内部存储、外部存储
  12. Linux下的tree命令 --Linux下目录树查看
  13. Pycharm使用技巧(转载)
  14. nginx+fastCGI
  15. Java ----> java io / java nio / java net 学习资源汇总
  16. git配置代理
  17. es6入门4--promise详解
  18. Dockerfile 收集
  19. python第二十六课——装饰器
  20. android prgoressBar setProgressDrawable 在4.0系统式正常,在2.3系统上不能正常使用的问题

热门文章

  1. Identity Server 4使用OpenID Connect添加用户身份验证(三)
  2. 我也是醉了,Eureka 延迟注册还有这个坑!
  3. 第十四天python3 面向对象
  4. 常用的函数式接口Function接口和常用的函数式接口Function接口默认方法andThen
  5. 斜率优化 dp 总结
  6. YII 技巧
  7. .Net 5.0快速上手 Redis
  8. Uniapp---快速生成安卓证书keystore文件
  9. 最佳实践 | 联通数科基于 DolphinScheduler 的二次开发
  10. .NET 6应用程序适配国产银河麒麟V10系统随记