安装filebeat方法

首页 论坛 安全运维 系统运维 安装filebeat方法

  • 该话题包含 0个回复,1 人参与,最后由飞飞侠 更新于 2年前
正在查看 1 个帖子:1-1 (共 1 个帖子)
  • 作者
    帖子
  • #31461
    飞飞侠
    版主
    ##安装filebeat方法
    ##编辑这个文件/etc/yum.repos.d/elk.repo
    
    [elasticsearch-5.x]
    name=Elasticsearch repository for 5.x packages
    baseurl=https://artifacts.elastic.co/packages/5.x/yum
    gpgcheck=1
    gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
    enabled=1
    autorefresh=1
    type=rpm-md
    
    
    安装filebeat命令
    yum install -y filebeat
    
    
    编辑 /etc/filebeat/filebeat.yml配置文件,要对应nginx日志文件路径
    
    filebeat.prospectors:
    
    - input_type: log
      paths:
        - /data/nginx/logs/error.log
      document_type: nginx-error
    
    - input_type: log
      paths:
        - /data/nginx/logs/access.log
      document_type: nginx-access
    
    output.logstash:
    
      hosts: ["192.168.1.112:5044"]
    
    
    重启filebeat生效
    service  filebeat  restart
    
    
    
    
    
    
    
    
正在查看 1 个帖子:1-1 (共 1 个帖子)
  • 哎呀,回复话题必需登录。
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索