当前位置:网站首页>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
边栏推荐
- Go language learning tutorial (13)
- mysql主从同步
- There are three ways to create instances by reflection (2022.6.6-6.12)
- Audio and video architecture construction in the super video era | science and Intel jointly launched the second season of "architect growth plan"
- 哪个券商佣金的佣金最低?另外,手机开户安全么?
- 更智能!AIRIOT加速煤炭行业节能减排升级
- How unity pulls one of multiple components
- Playwright - 滚动条操作
- 闲鱼难“翻身”
- 【已解决】抖音如何取消关注已注销的账户
猜你喜欢

Spark - 一文搞懂 Partitioner

VR云展厅如何给线下实体带来活力?有哪些功能?

Buttons to achieve various effects and functions. Reading this article is enough

QQmlApplicationEngine failed to load component qrc:/main.qml:-1 No such file or directory

A necessary tool for testing -- postman practical tutorial

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

Taiwan SSS Xinchuang sss1700 replaces cmedia cm6533 24bit 96KHz USB audio codec chip

实现各种效果和功能的按钮,读这篇文章就够了

说实话ThreadLocal真不是啥高级的东西

History, selection strategy and in-depth evaluation of note taking software
随机推荐
小学期,第三场-下午:WEB_sessionlfi
History, selection strategy and in-depth evaluation of note taking software
pycharm有用快捷键
[multithreading] use the thread pool to implement a simple thread pool
重复乃技艺之母
VR全景添加对比功能,让差异化效果展示更直观!
Primary school, session 3 - afternoon: Web_ xxe
《微信小程序-基础篇》带你了解小程序中的生命周期(二)
mysql主从同步
neo4j load csv 配置和使用
dataloader 源码_DataLoader
如何做好测试用例设计
Safe holidays without holidays, VR traffic makes children travel safely | Guangzhou Sinovel viewpoint
matlab 将三角剖分结果保存为STL文件
成长一夏 挑战赛来袭 专属社区福利来袭~免费获得CSDN定制T恤衫
MySQL数据库误删回滚的解决
Primary school, session 3 - afternoon: Web_ sessionlfi
WeakSet
arthas调试 确定问题工具包
Ten percent of the time, the tar command can't parse the English bracket "()" when decompressing the file