部署文件:filebeat->kafka集群(zk集群)->logstash->es集群->kibana
2024-09-08 10:54:07
该压缩包内包含以下文件:
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
最新文章
- Linux下百度云盘报 获取bdstoken失败
- html5,表单的综合案例
- lightoj1080 线段树
- linux安全体系
- python学习小结2:if和while控制语句
- Ubuntu 12.04 中安装和配置 Java JDK
- ASP.NET MVC 4 让数据库自动迁移
- Please check if the Publishing Tools on the server (System/PublishingTools) are started.
- log4j2日志
- redis的删除库应用(linux)
- Android数据存储之内部存储、外部存储
- Linux下的tree命令 --Linux下目录树查看
- Pycharm使用技巧(转载)
- nginx+fastCGI
- Java ---->; java io / java nio / java net 学习资源汇总
- git配置代理
- es6入门4--promise详解
- Dockerfile 收集
- python第二十六课——装饰器
- android prgoressBar setProgressDrawable 在4.0系统式正常,在2.3系统上不能正常使用的问题