Basic operation Elasticsearch cluster

Check cluster health status

_cluster/health?

$ curl -XGET http://172.16.101.55:9200/_cluster/health?pretty
{
  "cluster_name" : "dev-es",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 0,
  "active_shards" : 0,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 100.0
}

GET /_cat/health?v

$ curl -X GET "172.16.101.55:9200/_cat/health?v"
epoch      timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1575120812 13:33:32  dev-es  green           1         1      0   0    0    0        0             0                  -                100.0%

About the status bar status

  • green: a cluster represents everything is normal
  • yellow: indicates that all data are available, but some copies are not assigned, the cluster is currently in a usable state
  • red: a partial data unreachable for unknown reasons, the cluster part in an active state (e.g. clusters may continue to respond to requests to process data piece is available), but this time the cluster should be immediately detected fault. 

Note: 9200 is a RESTful interface http protocol

 

Guess you like

Origin www.cnblogs.com/ilifeilong/p/11964080.html