zoukankan      html  css  js  c++  java
  • elk快速入门-filebeat


    filebeat
    Filebeat是一个日志文件托运工具,在你的服务器上安装客户端后,filebeat会监控日志目录或者指定的日志文件,追踪读取这些文件(追踪文件的变化,不停的读),并且转发这些信息到elasticsearch或者logstarsh中存放。
    filebeat 可以收集本地文件,并可以输出到 redis,控制台,文件,kafka等

    --------------------------------------------------------------------------实战----------------------------------------------------------------------------

    1.filebeat将本地文件放入到redis
    filebeat.inputs:
    - type: log
    enabled: true
    paths:
    - /usr/local/soft/elk/install/logstash-7.1.0/config/demo/1.log


    output.redis:
    hosts: ["localhost:6379"]
    password: "RedisNodeDev@cnhis.com"
    key: "myredis"


    2.filebeat将本地文件放入到控制台
    filebeat.inputs:
    - type: log
    enabled: true
    paths:
    - /usr/local/soft/elk/install/logstash-7.1.0/config/demo/1.log

    output.console:
    pretty: true

    3.filebeat将本地文件放入到文件
    filebeat.inputs:
    - type: log
    enabled: true
    paths:
    - /usr/local/soft/elk/install/logstash-7.1.0/config/demo/1.log

    output.file:
    path: "/tmp/filebeat"
    filename: filebeat
    #rotate_every_kb: 10000
    #number_of_files: 7
    #permissions: 0600

    4.filebeat将本地文件放入到kafka
    filebeat.inputs:
    - type: log
    enabled: true
    paths:
    - /usr/local/soft/elk/install/logstash-7.1.0/config/demo/1.log

    output.kafka:
    enable: true
    hosts: ["47.107.146.57:9092"]
    topic: 'test'
    #version: '0.10.2.0'

  • 相关阅读:
    nth_element 使用方法
    Codeforces-1326E Bombs
    GDB下调试查看数组部分内容
    0930,主外键设置
    0928,数据库
    0924,函数返回多个值
    0921,函数 枚举
    0920,结构体
    0918,练习题
    0916,双色球练习题
  • 原文地址:https://www.cnblogs.com/lookupthesky/p/10948419.html
Copyright © 2011-2022 走看看