es 模板
{
"template": "log*",
"order":10,
"settings": {
"index":{
"refresh_interval" :"30s",
"number_of_shards": "6",
"number_of_replicas": "1",
"translog.flush_threshold_size": "1024mb",
"translog.durability": "async"
}
},
"mappings" :{
"logs" :{
"properties": {
"Date": {
"type": "date"
},
"Level": {
"type": "keyword"
},
"Class": {
"type": "keyword"
}
}
}
}
}
{
"template": "live*",
"order":0,
"settings": {
"index":{
"refresh_interval" :"30s",
"number_of_shards": "6",
"number_of_replicas": "1",
"translog.flush_threshold_size": "1024mb",
"translog.durability": "async"
}
},
"mappings" :{
"logs" :{
"properties": {
"@timestamp": {
"type": "date"
},
"Date": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"Level": {
"type": "keyword",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"Thread": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"RequestId": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"Class": {
"type": "keyword",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"msg": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
修改版本
{
"order": 9,
"template": "live*",
"settings": {
"index": {
"refresh_interval": "30s",
"number_of_shards": "6",
"translog": {
"flush_threshold_size": "1024mb",
"durability": "async"
},
"number_of_replicas": "1"
}
},
"mappings": {
"live-front": {-----------》这里的值不是随便写的。这里写成你的type的值
"properties": {
"@timestamp": {
"type": "date"
},
"Class": {
"type": "text"
},
"Date": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss.SSS"
},
"Level": {
"type": "keyword"
},
"RequestId": {
"type": "text"
},
"Thread": {
"type": "text"
},
"beat": {
"properties": {
"hostname": {
"type": "keyword"
}
}
},
"kafka": {
"properties": {
"consumer_group": {
"type": "keyword"
},
"offset": {
"type": "long"
},
"partition": {
"type": "long"
},
"topic": {
"type": "keyword"
}
}
},
"msg": {
"type": "text"
},
"source": {
"type": "keyword"
},
"type": {
"type": "keyword"
}
}
}
}
}
es 模板的更多相关文章
- es模板
Index Templatesedit Index templates allow you to define templates that will automatically be applied ...
- elasticsearch 动态模板设置
自定义动态映射 如果你想在运行时增加新的字段,你可能会启用动态映射.然而,有时候,动态映射 规则 可能不太智能.幸运的是,我们可以通过设置去自定义这些规则,以便更好的适用于你的数据. 日期检测 当 E ...
- es简单介绍及使用注意事项
是什么? Elasticsearch是一个基于Apache Lucene(TM)的开源搜索引擎.无论在开源还是专有领域,Lucene可以被认为是迄今为止最先进.性能最好的.功能最全的搜索引擎库. El ...
- 使用Logstash创建ES映射模版并进行数据默认的动态映射规则
本文配置为 ELK 即(Elasticsearch.Logstash.Kibana)5.5.1. Elasticsearch 能够自动检测字段的类型并进行映射,例如引号内的字段映射为 String,不 ...
- elasticsearch 动态模板
在elasticsearch中,如果你有一类相似的数据字段,想要统一设置其映射,就可以用到一项功能:动态模板映射(dynamic_templates). 每个模板都有一个名字用于描述这个模板的用途,一 ...
- Logstash动态模板映射收集Nginx的Json格式日志
Logstash传输给ES的数据会自动映射为5索引,5备份,字段都为text的的索引.这样基本上无法进行数据分析.所以必须将Logstash的数据按照既定的格式存储在ES中,这时候就要使用到ES模板技 ...
- Elasticsearch笔记
资料 官网: http://www.elasticsearch.org 中文资料:http://www.learnes.net/ .Net驱动: http://nest.azurewebsites.n ...
- 分布式实时日志处理平台ELK
这三样东西分别作用是:日志收集.索引与搜索.可视化展现 l logstash 这张架构图可以看出logstash只是collect和index的地方,运行时传入一个.conf文件,配置分三部分:in ...
- elasticsearch映射
前面讲到,无论是关系型数据库还是非关系型数据库,乃至elasticsearch这种事实上承担着一定储存作用的搜索引擎,数据类型都是非常重要而基础的概念.但elasticsearch与其它承担着数据存储 ...
随机推荐
- Mybatis-Generator自动生成XML文件以及接口和实体类
整合了MySQL和Oracle配置文件生成方法 这个是整个文件夹的下载地址:http://www.codepeople.cn/download 主要给大家介绍一下generatorConfig.xml ...
- 请指出document load和document ready的区别?
共同点:这两种事件都代表的是页面文档加载时触发. 异同点: ready 事件的触发,表示文档结构已经加载完成(不包含图片等非文字媒体文件). onload 事件的触发,表示页面包含图片等文件在内的所有 ...
- Struts2学习笔记一:工作流程与核心文件
转载请注明原文地址:http://www.cnblogs.com/ygj0930/p/6807539.html 1:客户端发出请求到web服务器 2:请求经过一系列filter,最终到达Struts ...
- python模块之keyword
# -*- coding: utf-8 -*- #python 27 #xiaodeng #python模块之keyword import keyword ''' >>> help( ...
- Ubuntu18.04下的音频录制和编辑软件Ardour及QjackCtl(jackd gui)
Ardour 是一个Linux和OSX下的多音轨录制和数字音频编辑软件. 需要配合ALSA或者JACK总线使用. 快速入门 http://brunoruviaro.github.io/ardour4- ...
- input文本框在div中居中
{display:block;margin-left:auto;margin-right:auto;}
- ios中NSObject分类(2)
#import <Foundation/Foundation.h> UIColor * rgb(int r, int g, int b); UIColor * rgbA(int r, in ...
- sqlserver修改为windows验证登陆, 程序的调整
业务需求, 客户要求sqlserver改为windows验证登陆, sa用户不可用, 程序端如何修改呢? 我在本机做了个测试. 环境: sqlserver2016, springmvc+spring+ ...
- 解决flume运行中的一个异常问题!
今天在本地测试flume的exec 监控文件 分割的问题!!!遇到各种141异常问题! 怀疑是在切割文件的时候超过了监控文本的时间,导致flume异常退出,,,所以增加了keep-alive 时 ...
- Webdriver设置Firefox自动下载
看到很多人在firefox上操作下载窗口用autoit,太麻烦了,提供一种用profile来解决的办法: FirefoxProfile profile = new FirefoxProfile(); ...