当前位置:网站首页>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
边栏推荐
猜你喜欢
Redis ziplist 压缩列表的源码解析

RP prototype resource sharing - shopping app

Kubevela 1.4: make application delivery safer, easier to use, and more transparent

小学期,第三场-下午:WEB_sessionlfi

企业中台规划和IT架构微服务转型

What is the difference between tolocal8bit and toutf8() in QT

Kubernetes为什么会赢,容器圈的风云变幻!

WordPress 博客使用火山引擎 veImageX 进行静态资源 CDN 加速(免费)

How unity pulls one of multiple components

企业中通过组策略管理Edge浏览器设置(IE模式、主页绑定等)
随机推荐
MySQL数据库查询优化
十分之坑,tar命令解压文件的时候竟然不能解析英文括号“()”
The former king of fruit juice sold for 1.6 billion yuan
【1175. 质数排列】
无线充U型超声波电动牙刷方案开发
线上线下双结合,VR全景是家具线上转型好方法!
重复乃技艺之母
【LeetCode】【SQL】刷题笔记
Ten percent of the time, the tar command can't parse the English bracket "()" when decompressing the file
VR全景中特效是如何编辑的?细节功能如何展示?
VoIP Push 在海外音视频业务中的应用
线下门店为什么要做新零售?
[multithreading] use the thread pool to implement a simple thread pool
请指教在线开户是什么意思?究竟网上开户是否安全么?
Inventory the six second level capabilities of Huawei cloud gaussdb (for redis)
杭州炒股开户选择手机办理安全吗?
4.3-inch touch screen 12 channel control port programmable network central control supports mutual backup of 5 central control hosts
【ICCV 2019】特征超分检测:Towards Precise Supervision of Feature Super-Resolution for Small Object Detection
企业中通过组策略管理Edge浏览器设置(IE模式、主页绑定等)
基于slate构建文档编辑器