首页 > 其他 > 详细

filebeat收集本地日志到文件

时间:2020-08-22 18:22:21      阅读:254      评论:0      收藏:0      [点我收藏+]

1.filebeat收集本地日志到文件配置

[root@web01 ~]# vim /etc/filebeat/filebeat.yml
filebeat.inputs:
- type: log
  enable: true
  paths:
    - /var/log/messages
output.file:
  path: "/tmp"
  filename: "filebeat_messages.log"

2.启动

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

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

3.测试

[root@web01 ~]# tail -f /tmp/filebeat_messages.log

#输入内容
[root@web01 ~]# echo "123" >> /var/log/messages

filebeat收集本地日志到文件

原文:https://www.cnblogs.com/Applogize/p/13545808.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!