{
"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 模板的更多相关文章

  1. es模板

    Index Templatesedit Index templates allow you to define templates that will automatically be applied ...

  2. elasticsearch 动态模板设置

    自定义动态映射 如果你想在运行时增加新的字段,你可能会启用动态映射.然而,有时候,动态映射 规则 可能不太智能.幸运的是,我们可以通过设置去自定义这些规则,以便更好的适用于你的数据. 日期检测 当 E ...

  3. es简单介绍及使用注意事项

    是什么? Elasticsearch是一个基于Apache Lucene(TM)的开源搜索引擎.无论在开源还是专有领域,Lucene可以被认为是迄今为止最先进.性能最好的.功能最全的搜索引擎库. El ...

  4. 使用Logstash创建ES映射模版并进行数据默认的动态映射规则

    本文配置为 ELK 即(Elasticsearch.Logstash.Kibana)5.5.1. Elasticsearch 能够自动检测字段的类型并进行映射,例如引号内的字段映射为 String,不 ...

  5. elasticsearch 动态模板

    在elasticsearch中,如果你有一类相似的数据字段,想要统一设置其映射,就可以用到一项功能:动态模板映射(dynamic_templates). 每个模板都有一个名字用于描述这个模板的用途,一 ...

  6. Logstash动态模板映射收集Nginx的Json格式日志

    Logstash传输给ES的数据会自动映射为5索引,5备份,字段都为text的的索引.这样基本上无法进行数据分析.所以必须将Logstash的数据按照既定的格式存储在ES中,这时候就要使用到ES模板技 ...

  7. Elasticsearch笔记

    资料 官网: http://www.elasticsearch.org 中文资料:http://www.learnes.net/ .Net驱动: http://nest.azurewebsites.n ...

  8. 分布式实时日志处理平台ELK

    这三样东西分别作用是:日志收集.索引与搜索.可视化展现 l  logstash 这张架构图可以看出logstash只是collect和index的地方,运行时传入一个.conf文件,配置分三部分:in ...

  9. elasticsearch映射

    前面讲到,无论是关系型数据库还是非关系型数据库,乃至elasticsearch这种事实上承担着一定储存作用的搜索引擎,数据类型都是非常重要而基础的概念.但elasticsearch与其它承担着数据存储 ...

随机推荐

  1. Markdown中实时显示数学公式的方法

    Markdown中实时显示数学公式的方法 Markdown非常好用,但是对于数学公式的实时显示有一些缺陷,如何解决这一问题呢? 一.在线LaTex编辑 点击在线LaTeX编辑方式 在对话框中输入数学公 ...

  2. linux下编译Zero C ICE

    0.简介 ZeroC ICE 是指ZeroC公司(www.zeroc.com)的ICE(Internet Communications Engine)中间件平台. 目前ICE平台中包括Ice,Ice- ...

  3. win10更新后无法远程,报 credssp加密oracle修正

    答案都在图里,看不清就浏览器放大观看 打开开始菜单,搜索“编辑组策略”  进入

  4. Golang Json文件解析为结构体工具-json2go

    代码地址如下:http://www.demodashi.com/demo/14946.html 概述 json2go是一个基于Golang开发的轻量json文件解析.转换命令行工具,目前支持转换输出到 ...

  5. Android 仿知乎创意广告

    代码地址如下:http://www.demodashi.com/demo/14904.html 一.概述 貌似前段时间刷知乎看到的一种非常有特色的广告展现方式,即在列表页,某一个Item显示背后部分广 ...

  6. 【phpstudy】安装Oracle 客户端 并连接

    参考连接:https://blog.csdn.net/liuquan007/article/details/77508518 phpstudy2016是32位版 phpstudy2014是64位版本[ ...

  7. 利用jquery修改href的部分字符

    试了好久 就一句代码即可. $(document).ready(function(){ $('a').each(function(){ this.href = this.href.replace('y ...

  8. [转]GFS架构分析

    Google文件系统(Google File System,GFS)是构建在廉价的服务器之上的大型分布式系统.它将服务器故障视为正常现象,通过软件的方式自动容错,在保证系统可靠性和可用性的同时,大大减 ...

  9. Swift3 颜色转换成图片Image

    Swift3下的转换写法: /// 将颜色转换为图片 /// /// - Parameter color: <#color description#> /// - Returns: < ...

  10. java struts2入门学习实例--使用struts2快速实现上传

    一.文件上传快速入门 1).关于上传表单三要素 >>尽量以POST请求方式上传,因为GET支持文件大小是有限制的. >>必须要加上enctype="multipart ...