zoukankan      html  css  js  c++  java
  • Packetbeat简介

    Packetbeat简介

    抓包示例

    下载packetbeat

    抓取elasticsearch的包

    ①启动elasticsearch

    启动packetbeat

    配置es.yml

    #################### Packetbeat Configuration Example #########################

    # This file is an example configuration file highlighting only the most common

    # options. The packetbeat.full.yml file from the same directory contains all the

    # supported options with more comments. You can use it as a reference.

    #

    # You can find the full configuration reference here:

    # https://www.elastic.co/guide/en/beats/packetbeat/index.html

    #============================== Network device ================================

    # Select the network interface to sniff the data. On Linux, you can use the

    # "any" keyword to sniff on all connected interfaces.

    packetbeat.interfaces.device: lo0

    packetbeat.protocols.http:

      # Configure the ports where to listen for HTTP traffic. You can disable

      # the HTTP protocol by commenting out the list of ports.

      ports: [9200]

      send_request: true  

      include_body_for: ["application/json", "x-www-form-urlencoded"]

    #================================ Outputs =====================================

    # Configure what outputs to use when sending the data collected by the beat.

    # Multiple outputs may be used.

    #-------------------------- Elasticsearch output ------------------------------

    #output.elasticsearch:

      # Array of hosts to connect to.

      #  hosts: ["localhost:9200"]

      # Optional protocol and basic auth credentials.

      #protocol: "https"

      #username: "elastic"

      #password: "changeme"

    output.console:

        pretty: true

    #================================ Logging =====================================

    # Sets log level. The default log level is info.

    # Available log levels are: critical, error, warning, info, debug

    #logging.level: debug

    # At debug level, you can selectively enable logging only for some components.

    # To enable all selectors use ["*"]. Examples of other selectors are "beat",

    # "publish", "service".

    #logging.selectors: ["*"]

    启动

    请求elasticsearch

    可以看到packetbeat有内容输出

  • 相关阅读:
    div标签和span标签的简单区别
    方法重载的好处及区别
    异步计算工具
    设置"用于统计的冗余字段"要谨慎
    如何建立索引
    NFS,Memcached,Tokyo tyrant实现session共享性能测试
    mysql cache功能小记
    PHP程序员也要学会使用“异常”
    xdebug: var_dump函数设置
    用shell写个简单的log监控程序
  • 原文地址:https://www.cnblogs.com/reblue520/p/10862810.html
Copyright © 2011-2022 走看看