当前位置:网站首页>Filebeat custom indexes and fields
Filebeat custom indexes and fields
2022-06-30 20:02:00 【m0_ sixty million seven hundred and twenty-five thousand two hu】
Catalog
Like logstash, By default filebeat-* The index of and use the... Under the unzipped directory fields.yml( Binary compression package )
The requirement here is to parse the generated specific file , Each line is recorded as json Formatted data , need :
- Different files generate different indexes ;
- Type needs to be defined , The string was not used in the original query
.keyword, Because the default template uses less than 1024 yes keyword, Conversely text, If you want to bekeywordUse isfieldName.keyword;
To configure
setup.template.name: custom_name
setup.template.pattern: custom_name_*
setup.template.enabled: false
setup.template.overwrite: false
setup.template.fields: customFields.yml
setup.ilm.enabled: false
processors:
- drop_fields:
fields: [log, host, input, agent, ecs]
ignore_missing: false
filebeat.inputs:
- close_removed: true
close_inactive: 5m
type: log
tags: [t1]
clean_removed: true
enabled: true
json: {
keys_under_root: true, overwrite_keys: true}
paths: [/data/t1_*]
- close_removed: true
close_inactive: 5m
type: log
tags: [t2]
clean_removed: true
enabled: true
json: {
keys_under_root: true, overwrite_keys: true}
paths: [/data/t2_*]
output.elasticsearch:
indices:
- index: custom_name_t1
when.contains: {
tags: t1}
- when.contains: {
tags: t2}
index: custom_name_t2
hosts: ['127.0.0.1:9200']
setup.template.name Set up a new template , The name of the template
setup.template.pattern The template matches those indexes
setup.template.enabled: false Turn off the default template configuration
setup.template.overwrite: false Whether to overwrite the existing template
when.contains: contain
keys_under_root: true take field Expand to outermost (the custom fields are stored as top-level fields in the output document)
Please view the customized template :Configuration-template
Please check the file path :Configure project paths
Field definition
setup.template.fields: customFields.yml( Please see the above link for the path ), The file format is as follows :
- key: custom_name
title: custom_name
description: > custom fields
fields:
# some desc
- name: t1
type: keyword
- name: t2
type: keyword
- name: t3
type: ip
- name: t4
type: integer
- name: t5
type: ip
- name: t6
type: integer
- name: t7
type: ip
- name: t8
type: text
- name: t9
type: date
- name: t10
type: long
边栏推荐
- C语言:hashTable
- History, selection strategy and in-depth evaluation of note taking software
- 说实话ThreadLocal真不是啥高级的东西
- Primary school, session 3 - afternoon: Web_ sessionlfi
- Conditional compilation
- 企业中通过组策略管理Edge浏览器设置(IE模式、主页绑定等)
- 【多线程】使用线程池、实现一个简单线程池
- Inventory the six second level capabilities of Huawei cloud gaussdb (for redis)
- Abaqus 2022软件安装包和安装教程
- Data intelligence - dtcc2022! China database technology conference is about to open
猜你喜欢

GeoServer安装

This morning, investors began to travel collectively

Enterprise middle office planning and it architecture microservice transformation

传输层 使用滑动窗口实现流量控制

Safe holidays without holidays, VR traffic makes children travel safely | Guangzhou Sinovel viewpoint

如何做好测试用例设计
Django上传excel表格并将数据写入数据库的详细步骤

mysql主从同步

新出生的机器狗,打滚1小时后自己掌握走路,吴恩达开山大弟子最新成果

Unity 如何拖拉多个组件中的一个
随机推荐
neo4j load csv 配置和使用
Application of VoIP push in overseas audio and video services
永远不要使用Redis过期监听实现定时任务!
QT :QAxObject操作Excel
yolo 目标检测
解决arm_release_ver of this libmali is ‘g2p0-01eac0‘,rk_so_ver is ‘4‘,libgl1-mesa-dev不会被安装,存在未满足的依赖关系
A detailed explanation of the implementation principle of go Distributed Link Tracking
【450. 删除二叉搜索树中的节点】
“更福特、更中国”拨云见日,长安福特王牌产品订单过万
Advanced skills of testers: a guide to the application of unit test reports
C语言:hashTable
Safe holidays without holidays, VR traffic makes children travel safely | Guangzhou Sinovel viewpoint
暑期实训21组第一周个人工作总结
《微信小程序-基础篇》带你了解小程序中的生命周期(二)
测试必备工具 —— Postman实战教程
FH6908A负极关断同步整流模拟低压降二极管控制IC芯片TSOT23-6超低功耗整流器 1w功耗 <100uA静态 替代MP6908
【已解决】抖音如何取消关注已注销的账户
台湾SSS鑫创SSS1700替代Cmedia CM6533 24bit 96KHZ USB音频编解码芯片
This morning, investors began to travel collectively
Inventory the six second level capabilities of Huawei cloud gaussdb (for redis)