Green - everything is good (cluster is fully functional)
Yellow - all data is available but some replicas are not yet allocated (cluster is fully functional)
Red - some data is not available for whatever reason (cluster is partially functional)
获得节点列表:
1 2 3
[jimo@jimo-pc elasticsearch-6.0.0]$ curl http://localhost:9200/_cat/nodes?v ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name 127.0.0.1 22 44 8 0.49 0.45 0.45 mdi * I9nSfCF
List All Indices
列出所有索引:
1 2
[jimo@jimo-pc elasticsearch-6.0.0]$ curl http://localhost:9200/_cat/indices?v health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
看起来一个都没有。
Create an Index
既然没有就创建一个:采用PUT方式
1 2 3 4 5 6 7 8 9 10
[jimo@jimo-pc elasticsearch-6.0.0]$ curl -XPUT 'localhost:9200/customer?pretty&pretty' { "acknowledged" : true, "shards_acknowledged" : true, "index" : "customer" } # 结果 [jimo@jimo-pc elasticsearch-6.0.0]$ curl -XGET 'localhost:9200/_cat/indices?v&pretty' health status index uuid pri rep docs.count docs.deleted store.size pri.store.size yellow open customer AmBi42pqTlOf9UbIMgvWWw 5 1 0 0 1.1kb 1.1kb