Home > OS >  Centos7 es shard how to do
Centos7 es shard how to do

Time:09-21

Because the default number of fragmentation in centos7 for one, can only when creating an index to the es subdivision number, so how to customize es subdivision number? Transfer data is the key to using the logstash to es, related to the configuration file is as follows:
The output {

Elasticsearch {

Hosts=& gt; [192.168.59.163:9200 ""]

The index=& gt; "Accesslog - % {+ YYYY. MM. Dd}"

}

Stdout {

The codec=& gt; "Rubydebug
"
}

How do I in logstash config file directly when adding indexes will set the es subdivision number,

CodePudding user response:

Curl - user username: passwd XPUT http://localhost:9200/_template/log - d '{
"Template" : "*",
"Settings" : {
"Number_of_shards" : 5,
"Number_of_replicas" : "0"
}
}
'
Perform on ES, set the default template,
The template * refers to any index, you can also write the log *, etc., after six versions of it may not seem like the field,

CodePudding user response:

The main configuration file can set the number of fragmentation index. Number_of_shards
  • Related