yum方式安装filebeat过程

x33g5p2x  于2021-03-14 发布在 ElasticSearch  
字(0.5k)|赞(0)|评价(0)|浏览(838)

创建repo存储库,由于官方源太慢,这里使用国内清华源

cat > /etc/yum.repos.d/elasticsearch.repo << EOF
[elasticsearch-7.x]
name=Elasticsearch repository for 7.x packages
baseurl=https://mirrors.tuna.tsinghua.edu.cn/elasticstack/yum/elastic-7.x/
gpgcheck=0
enabled=1
EOF

#安装filebeat:
yum install -y filebeat

修改配置文件

$ vi /etc/filebeat/filebeat.yml
filebeat.inputs:
- type: log
  enabled: true
  paths:
    - /var/log/*.log
output.elasticsearch:
  hosts: ["192.168.92.80:9200"]

测试配置是否有误:

filebeat test config -e

启动filebeat服务

systemctl enable --now filebeat

kibana添加index即可查看收集的日志.

相关文章

微信公众号

最新文章

更多