zoukankan      html  css  js  c++  java
  • filebeat-6.4.3-windows-x86_64输出Kafka

    配置filebeat.yml文件

    filebeat.prospectors:
    
    - type: log
      encoding: utf-8
      enabled: true
      paths:
        - e:log.log
      multiline:
        pattern: '^['
        negate: true
        match: after
      fields:
      log_topics: test1
    
        
    #============================= Filebeat modules ===============================
    
    filebeat.config.modules:
      # Glob pattern for configuration loading
      path: ${path.config}/modules.d/*.yml
    
      # Set to true to enable config reloading
      reload.enabled: false
    
      # Period on which files under path should be checked for changes
      #reload.period: 10s
    
    #==================== Elasticsearch template setting ==========================
    
    #setup.template.settings:
    #  index.number_of_shards: 3
      #index.codec: best_compression
      #_source.enabled: false
    
    
    #setup.kibana:
    
      # Kibana Host
      # Scheme and port can be left out and will be set to the default (http and 5601)
      # In case you specify and additional path, the scheme is required: http://localhost:5601/path
      # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
      #host: "localhost:5601"
    
    
    #================================ Outputs =====================================
    
    # Configure what output to use when sending the data collected by the beat.
    
    #-------------------------- Elasticsearch output ------------------------------
    
    output.kafka: 
        enabled: true 
        hosts: ["127.0.0.1:9092"]
        topic: test1
        max_message_bytes: 10485760 

    启动

    .filebeat -e -c filebeat.yml 就可以启动filebeat
  • 相关阅读:
    SSM中(Spring-SpringMVC-Mybatis)(一:概念)
    java中的==和equals()
    JAVA之二叉查找树
    Java中堆与栈
    java的运行机制(基础)
    覆盖(重写),重构,重载的区别
    JAVA多线程基础
    java中的类修饰符、成员变量修饰符、方法修饰符
    JAVA中的流程控制语句
    JAVA中的构造函数
  • 原文地址:https://www.cnblogs.com/zhanchaohan/p/10281164.html
Copyright © 2011-2022 走看看