标签:elk Filebeat 部署 filebeat 64 Linux 7.8 root localhost
1 下载
[root@localhost ~]# cd /home/elk
1.1 ELK7.8.1
[root@localhost elk]# wget https://artifacts.elastic.co/downloads/logstash/logstash-7.8.1.tar.gz
[root@localhost elk]# wget https://artifacts.elastic.co/downloads/kibana/kibana-7.8.1-linux-x86_64.tar.gz
[root@localhost elk]# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.1-linux-x86_64.tar.gz
[root@localhost elk]# wget https://artifacts.elastic.co/downloads/elasticsearch/filebeat-7.8.1-linux-x86_64.tar.gz
2 Filebeat安装
2.1 解压
[root@localhost elk]# tar -zxvf filebeat-7.8.1-linux-x86_64.tar.gz -C /home/elk/
[root@localhost elk]# cd filebeat-7.8.1-linux-x86_64/
2.2 修改配置
[root@localhost filebeat-7.8.1-linux-x86_64]# vi filebeat.yml
# ============================== Filebeat inputs ===============================
filebeat.inputs:
# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.
- type: log
# Change to true to enable this input configuration.
enabled: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
#- /var/log/*.log
- /home/logs/*.log
#- c:\programdata\elasticsearch\logs\*
.....
# -------------------------------- Kafka Output --------------------------------
output.kafka:
# initial brokers for reading cluster metadata
# hosts: ["kafka1:9092", "kafka2:9092", "kafka3:9092"]
hosts: ["192.168.56.13:9092"]
# message topic selection + partitioning
topic: 'gsdss-test'
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
max_message_bytes: 1000000
# ---------------------------- Elasticsearch Output ----------------------------
#output.elasticsearch:
# Array of hosts to connect to.
#hosts: ["localhost:9200"]
# Protocol - either `http` (default) or `https`.
#protocol: "https"
# Authentication credentials - either API key or username/password.
#api_key: "id:api_key"
#username: "elastic"
#password: "changeme"
2.3 创建Kafka的Topic
#使用kafka-topics.sh创建topic
bin/kafka-topics.sh --create --zookeeper 192.168.56.13:2181 --replication-factor 1 --partitions 1 --topic gsdss-test
2.4 启动
#后台启动
[root@localhost filebeat-7.8.1-linux-x86_64]# nohup ./filebeat -c ./filebeat.yml &
#查看控制台
[root@localhost filebeat-7.8.1-linux-x86_64]# tail -f nohup.out
#关闭,通过发送SIGTERM给Logstash进程来停止它
[root@localhost logstash-7.6.2]# kill -15 {pid}
标签:elk,Filebeat,部署,filebeat,64,Linux,7.8,root,localhost 来源: https://www.cnblogs.com/qiusheng0755/p/15173376.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。