(1) 设置分片数。定义模板 凡是以logstash-的都继承 意思1个分片 0个副本
curl -XPUT 'http://10.240.37.56:9200/_template/template_http_request_record' -H 'Content-Type: application/json' -d '{"index_patterns": ["logstash-*"],"settings": {"number_of_shards": 1,"number_of_replicas": 0}}'
curl -XPUT 'http//127.0.0.1:9200/_cluster/settings' -d '{"transient" : {"action.auto_create_index":"true"}}'
(4)只查看集群健康状态
curl http://10.240.37.56:9200/_cluster/health?pretty
(5)查看主master机器
curl http://10.240.37.56:9200/_cat/master?pretty
6.查看所有索引
curl -GET http://10.240.37.51:9200/_cat/indices