悟空,拿我的打狗棒来

logstash6.3.2设置动态mapping 到es 配置问题~

Logstash | 作者 zhangshuai | 发布于2018年09月06日 | 阅读数:3426

请问下 现在这个还支持嘛,为什么我的设置一直都不生效。具体配置如下:

output {
elasticsearch{
hosts => ["192.168.103.3:9200","192.168.103.4:9200","192.168.103.5:9200"]
index => "appl-%{+YYYY.MM.dd}"
template => "/home/bigdata/apps/logstash/config/appl_mapping.json"
template_name => "appl-%{+YYYY.MM.dd}"
template_overwrite => true
manage_template => true

}
------------------------------------------------------------------------------------
json文件部分如下:
{
"template" : "appl-*",
"settings": {
"index": {
"index.refresh_interval" : "60s",
"number_of_shards": "5",
"number_of_replicas": "1"
}
},
"mappings": {
"doc": {
"properties": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"appname": {
"type": "string",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
已邀请:

lmy

赞同来自:

模板配置添加:
“order”: 1

要回复问题请先登录注册