我的elasticsearch版本是7.7.1。 我的想法是ES在初始化索引时不创建副本,不刷新索引,只有一个主分片。创建索引后如果遇到logstash-nginx-*的文档就将文档写入logstash-nginx索引里,然后将刷新时间改为120s, 30个主分片,1个副本。以下两个模板的内容:
logstash模板:
请问logash-nginx模块会将logstash模块的参数覆盖吗?
上面的两个模板能实现我的想法吗?
logstash模板:
PUT _template/logstash?include_type_name
{
"version": 60001,
"order": 1,
"index_patterns": [
"logstash-*"
],
"settings": {
"index": {
"refresh_interval": "-1",
"number_of_shards": "1",
"number_of_replicas": "0"
}
}
}
logstash-nginx模板:PUT _template/logstash-nginx?include_type_name
{
"version": 1,
"order": 2,
"index_patterns": [
"logstash-nginx-*"
],
"settings": {
"index": {
"refresh_interval": "120s",
"number_of_shards": "30",
"number_of_replicas": "1"
}
}
}
请问logash-nginx模块会将logstash模块的参数覆盖吗?
上面的两个模板能实现我的想法吗?
3 个回复
God_lockin
赞同来自:
byx313 - BLOG:https://www.jianshu.com/u/43fd06f9589c
赞同来自:
minix
赞同来自: