Beats快速上手

2020-01-18  本文已影响0人  Echoooo_o

step2:配置文件filebeat.yml
1.Define the path (or paths) to your log files.

filebeat.inputs:
- type: log
  enabled: true
  paths:
    - /var/log/*.log

2.Configure the output

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

如果kibana安装在与ES同一台机器上就跳过配置 Kibana

setup.kibana:
  host: "mykibanahost:5601"

MySQL module
1.该mysql模块收集并解析MySQL创建的慢速日志和错误日志。

./filebeat modules enable mysql

2.配置 modules.d/mysql.yml

- module: mysql
  error:
    enabled: true
    var.paths: ["/path/to/log/mysql/error.log*"]
  slowlog:
    enabled: true
    var.paths: ["/path/to/log/mysql/mysql-slow.log*"]
上一篇 下一篇

猜你喜欢

热点阅读