首页 > 其他分享 >packetbeat配置

packetbeat配置

时间:2024-04-09 11:14:14浏览次数:14  
标签:配置 enabled dashboards Kibana Elasticsearch output packetbeat

packetbeat配置文件:

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

# This file is an example configuration file highlighting only the most common
# options. The packetbeat.reference.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: 0
#packetbeat.interfaces.type: af_packet
packetbeat.interfaces.buffer_size_mb: 100
#================================== Flows =====================================

# Set `enabled: false` or comment out all options to disable flows reporting.
packetbeat.flows:
  # Set network flow timeout. Flow is killed if no packet is received before being
  # timed out.
  timeout: 30s

  # Configure reporting period. If set to -1, only killed flows will be reported
  period: 10s

#========================== Transaction protocols =============================



#==================== Elasticsearch template setting ==========================

setup.template.settings:
  index.number_of_shards: 1
  #index.codec: best_compression
  #_source.enabled: false

#================================ General =====================================

# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:

# The tags of the shipper are included in their own field with each
# transaction published.
#tags: ["service-X", "web-tier"]

# Optional fields that you can specify to add additional information to the
# output.
#fields:
#  env: staging


#============================== Dashboards =====================================
# These settings control loading the sample dashboards to the Kibana index. Loading
# the dashboards is disabled by default and can be enabled either by setting the
# options here or by using the `setup` command.
#setup.dashboards.enabled: false

# The URL from where to download the dashboards archive. By default this URL
# has a value which is computed based on the Beat name and version. For released
# versions, this URL points to the dashboard archive on the artifacts.elastic.co
# website.
#setup.dashboards.url:

#============================== Kibana =====================================

# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
# This requires a Kibana endpoint configuration.
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"

  # Kibana Space ID
  # ID of the Kibana Space into which the dashboards should be loaded. By default,
  # the Default Space will be used.
  #space.id:

#============================= Elastic Cloud ==================================

# These settings simplify using packetbeat with the Elastic Cloud (https://cloud.elastic.co/).

# The cloud.id setting overwrites the `output.elasticsearch.hosts` and
# `setup.kibana.host` options.
# You can find the `cloud.id` in the Elastic Cloud web UI.
#cloud.id:

# The cloud.auth setting overwrites the `output.elasticsearch.username` and
# `output.elasticsearch.password` settings. The format is `<user>:<pass>`.
#cloud.auth:

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

#output.console:
#  pretty: true

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

#-------------------------- Elasticsearch output ------------------------------
# ---------------------------- Kafka Output ----------------------------
output.kafka:
  enabled: true
  hosts: ["10.0.8.1:9092","10.0.8.2:9092","10.0.8.3:9092"]
  topic: topic-ad-netflow-logs
  worker: 2
  required_acks: 1
  compression: gzip
  max_message_bytes: 10000000
  version: "0.10.1.0"


#================================ Processors =====================================

# Configure processors to enhance or manipulate events generated by the beat.
#只抓取目的IP为10.10.202.134的tcp请求,并删除一些字段
processors:
    - drop_event:
          when:
              or:
                  - not:
                         equals:
                             network.transport: "tcp"
                  - not:
                         equals:
                             destination.ip: '10.10.202.134'
    - drop_fields:
          fields: ["ecs","agent","flow","network.community_id","event.action","event.category","event.dataset","event.kind","event.duration"]






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

# Sets log level. The default log level is info.
# Available log levels are: 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: ["*"]

#============================== Xpack Monitoring ===============================
# packetbeat can export internal metrics to a central Elasticsearch monitoring
# cluster.  This requires xpack monitoring to be enabled in Elasticsearch.  The
# reporting is disabled by default.

# Set to true to enable the monitoring reporter.
#xpack.monitoring.enabled: false

# Uncomment to send the metrics to Elasticsearch. Most settings from the
# Elasticsearch output are accepted here as well. Any setting that is not set is
# automatically inherited from the Elasticsearch output configuration, so if you
# have the Elasticsearch output configured, you can simply uncomment the
# following line.
#xpack.monitoring.elasticsearch:

#================================= Migration ==================================

# This allows to enable 6.7 migration aliases
#migration.6_to_7.enabled: true

 

标签:配置,enabled,dashboards,Kibana,Elasticsearch,output,packetbeat
From: https://www.cnblogs.com/dreamer-fish/p/18123446

相关文章

  • 在Linux中,如何配置和使用fail2ban来防止暴力攻击?
    fail2ban是一个用于防止暴力攻击(如破解密码尝试)的安全工具,它通过监控系统日志文件来检测异常行为,并在检测到多次失败的登录尝试后,自动采取措施(如暂时或永久地阻止攻击者的IP地址)。1.配置fail2ban安装fail2ban:使用你的Linux发行版的包管理器安装fail2ban。例如,在基于Debian的......
  • Elasticsearch 配置内置分析器(3)
    一.内置分析器(analyzer)内置分析器无需任何配置即可直接使用,也支持配置选项来更改其行为。下面示例,分别使用了自定义分析器与内置分析器PUTmy-index-000001{"settings":{"analysis":{"analyzer":{"std_english":{#自定义分析......
  • SpringBoot集成jasypt,加密yml配置文件
    一、Jasypt简介Jasypt是一个Java简易加密库,用于加密配置文件中的敏感信息,如数据库密码。jasypt库与springboot集成,在实际开发中非常方便。1、JasyptSpringBoot为springboot应用程序中的属性源提供加密支持,出于安全考虑,Springboot配置文件中的敏感信息通常需要对它进......
  • Composer安装与配置
    Composer是一个用于依赖管理的PHP工具,可以帮助我们更方便地管理和安装项目所需的第三方库和依赖。在本文中,我将介绍如何安装和配置Composer。一、安装ComposerComposer的安装非常简单,只需按照以下步骤操作即可:首先,确保你的系统已经安装了PHP。你可以通过在终端输入php-v命......
  • Miktrotron MC2588相机配置
    MC2588大面阵相机MC2588测试CoaXPress测试该相机在Hello-FPGACoaXPress系统中工作状态良好。WIN10PCIeGen3x8KU040FPGAHello-FPGA2.0FMCHOSTCard......
  • 配置STM32单片机的两个高速输入端子接受AB相高速脉冲信号输入的方法
    目录1.配置GPIO引脚:2.配置TIM计数器:3.配置中断:4.计数器值的获取:        要使用STM32单片机的两个高速输入端子接受AB相高速脉冲信号输入,并使用TIM计数器的不同通道对每相的计数,请按照以下步骤操作:1.配置GPIO引脚:        首先,需要将两个高速输入......
  • axios配置全局过滤器
    importaxiosfrom'axios'constservice=axios.create({baseURL:'/api',//注意!!这里是全局统一加上了'/api'前缀,也就是说所有接口都会加上'/api'前缀在,页面里面写接口的时候就不要加'/api'了,否则会出现2个'/api',类似'/api/api/user'......
  • 配置交换机 SSH 管理和端口安全——实验1:配置交换机基本安全和 SSH管理
    实验目的通过本实验可以掌握:交换机基本安全配置。SSH的工作原理和SSH服务端和客户端的配置。实验拓扑交换机基本安全和SSH管理实验拓扑如图所示。                                         交换机基本安全和SSH管理实验拓......
  • yaml配置文件
    参考:https://blog.csdn.net/weixin_62221994/article/details/132612140一、YAML概述YAML全称是YAMLAin'tMarkupLanguage。YAML是一种直观的能够被电脑识别的的数据数据序列化格式,并且容易被人类阅读,容易和脚本语言交互的,可以被支持YAML库的不同的编程语言程序导入,比如:C......
  • Packet Tracer - 配置单臂路由器 VLAN 间,路由为交换机添加 V配置子接口,测试使用 VLA
    配置指令是下面以下均要进入特权模式enable以及全局模式configterminalS1S1(config)#vlan10S1(config-vlan)#vlan30S1(config-vlan)#exitS1(config)#intf0/11S1(config-if)#switchportmodeaccessS1(config-if)#switchportaccessvlan10S1(config-if)#int......