当前位置:网站首页>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
边栏推荐
- 小学期,第三场-下午:WEB_xxe
- A necessary tool for testing -- postman practical tutorial
- History, selection strategy and in-depth evaluation of note taking software
- 小学期,第三场-下午:WEB_sessionlfi
- 盘点华为云GaussDB(for Redis)六大秒级能力
- 将秒数转换为**小时**分钟
- A detailed explanation of the implementation principle of go Distributed Link Tracking
- Smarter! Airiot accelerates the upgrading of energy conservation and emission reduction in the coal industry
- Advanced skills of testers: a guide to the application of unit test reports
- RP原型资源分享-购物类App
猜你喜欢

Friends in Guangzhou can join us if they have the opportunity

History, selection strategy and in-depth evaluation of note taking software

成长一夏 挑战赛来袭 专属社区福利来袭~免费获得CSDN定制T恤衫

Idle fish is hard to turn over
![[multithreading] use the thread pool to implement a simple thread pool](/img/24/ad3ced1d4aebde3f2233b04752bead.png)
[multithreading] use the thread pool to implement a simple thread pool

Growth summer challenge is coming, exclusive community welfare is coming ~ get CSDN customized T-shirt for free

线上线下双结合,VR全景是家具线上转型好方法!

Enterprise middle office planning and it architecture microservice transformation

Character class of regular series

Application of VoIP push in overseas audio and video services
随机推荐
6-1漏洞利用-FTP漏洞利用
广州炒股开户选择手机办理安全吗?
企业中通过组策略管理Edge浏览器设置(IE模式、主页绑定等)
[jetsonnano] [tutorial] [introductory series] [i] how to enable VNC sharing
网易云签到可抽奖?那一年我能签到365天。不信?你看。
派尔特医疗在港交所招股书二次“失效”,上市计划实质性延迟
测试人进阶技能:单元测试报告应用指南
传输层 使用滑动窗口实现流量控制
Unity 如何拖拉多个组件中的一个
【NLP】【TextCNN】 文本分类
如何使用robots.txt及其详解
WeakSet
Force deduction ----- count the string containing the given prefix
企业中台规划和IT架构微服务转型
《微信小程序-基础篇》带你了解小程序中的生命周期(二)
SM2246EN+闪迪15131
Is it safe to open an account for mobile phone stock trading!?
【多线程】使用线程池、实现一个简单线程池
太湖 “中国健康农产品·手机直播万里行”走进太湖
VR全景中特效是如何编辑的?细节功能如何展示?