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