设置副本数

PUT /_all/_settings?
{
  "index.number_of_replicas": 0
}

设置分片数设置副本数

PUT /_all/_settings?
{
  "index.number_of_replicas": 0
}

设置分片数

PUT /_all/_settings?
{
  "number_of_shards" :  1
}

修改默认模板

filebeat 开头所有索引。
PUT /_template/template_http_request_record
{
  "index_patterns": ["filebeat-*"],
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  }
}
全部索引
PUT /_template/template_http_request_record
{
  "index_patterns": ["*"],
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  }
}
PUT /_all/_settings?
{
  "number_of_shards" :  1
}

修改默认模板

filebeat 开头所有索引。
PUT /_template/template_http_request_record
{
  "index_patterns": ["filebeat-*"],
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  }
}

全部索引
PUT /_template/template_http_request_record
{
  "index_patterns": ["*"],
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  }
}

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据