• packetbeat配置


    packetbeat.yml  vois 

    #################### Packetbeat Configuration Example #########################
    
    # =============================== Network device ===============================
    
    
    packetbeat.interfaces.device: eth0
    packetbeat.interfaces.internal_networks:
      - private
    
    # =========================== Transaction protocols ============================
    
    packetbeat.protocols:
    - type: dns
      # Configure the ports where to listen for DNS traffic. You can disable
      # the DNS protocol by commenting out the list of ports.
      ports: [53]
      include_authorities: true
      include_additionals: true
    
    # ================================== Outputs ===================================
    
    # Configure what output to use when sending the data collected by the beat.
    
    # -------------------------------- Kafka Output --------------------------------
    # output.kafka:
    #   # Boolean flag to enable or disable the output module.
    #   enabled: true
    #   hosts: ["localhost:9092"]
    #   topic: beats
    #   version: '2.13'
    #   codec.json:
    #     pretty: true
    
    # ------------------------------- Console Output -------------------------------
    output.console:
      enabled: true
      codec.json:
        pretty: true
    
    # ================================= Processors =================================
    
    processors:
      - include_fields:
          fields:
            - client.bytes
            - server.bytes
            - client.ip
            - server.ip
            - dns.question.name
            - dns.question.etld_plus_one
            - dns.response_code
            - dns.flags.authoritative
            - dns.flags.recursion_available
            - dns.flags.recursion_desired
            - dns.answers_count
            - dns.authorities
            - dns.authorities_count
            - dns.authorities.name
            - dns.authorities.type
            - dns.authorities.class
            - dns.additionals
            - dns.additionals.data
            - dns.opt.version
            - dns.opt.udp_size
            - dns.opt.ext_rcode
            - dns.answers
    
    # ================================== Logging ===================================

    最终生成的数据格式依赖于processor配置,详细的配置参考:https://www.elastic.co/guide/en/beats/packetbeat/current/exported-fields-dns.html

    启动packetbeat

    ./packetbeat -c packetbeat.yml

  • 相关阅读:
    168. Excel Sheet Column Title
    461. Hamming Distance
    Tree Representation Implementation & Traversal
    404. Sum of Left Leaves
    572. Subtree of Another Tree
    20. Valid Parentheses
    Check time of different search methods
    Binary search tree or not
    Coin Change
    JS DOM:文档对象模型 --树模型 文档:标签文档,对象:文档中每个元素对象,模型:抽象化的东西
  • 原文地址:https://www.cnblogs.com/wt11/p/16647229.html
Copyright © 2020-2023  润新知