filebeat收集本地日志到ES

1.配置

filebeat.inputs:
- type: log
  enable: true
  paths:
    - /var/log/nginx/access.log

output.elasticsearch:
  hosts: ["10.0.0.51:9200"]

2.启动

[root@web01 ~]# systemctl restart filebeat.service

#验证
[root@web01 ~]# ps -ef | grep filebeat

3.测试

#访问Nginx
http://10.0.0.7:8081/

#查看ES页面
posted @ 2020-08-22 15:24  等等马上就好  阅读(2863)  评论(0编辑  收藏  举报