Let’s start with a basic health check, which we can use to see how our cluster is doing. We’ll be using curl to do this but you can use any tool that allows you to make HTTP/REST calls. Let’s assume that we are still on the same node where we started Elasticsearch on and open another command shell window.html
_cat
API. You can run the command below in
Kibana’s Console by clicking "VIEW IN CONSOLE" or with
curl
by clicking the "COPY AS CURL" link below and pasting it into a terminal.
GET /_cat/health?v
And the response:node
epoch timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent 1475247709 17:01:49 elasticsearch green 1 1 0 0 0 0 0 0 - 100.0%
We can see that our cluster named "elasticsearch" is up with a green status.shell
咱們能夠看到名爲「elasticsearch」的羣集處於綠色狀態。網絡
Whenever we ask for the cluster health, we either get green, yellow, or red.curl
每當咱們要求羣集健康時,咱們要麼得到綠色,黃色或紅色。elasticsearch
一、Green - everything is good (cluster is fully functional)GET /_cat/nodes?v
And the response:ide
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name 127.0.0.1 10 5 5 4.46 mdi * PB2SGZY
Here, we can see our one node named "PB2SGZY", which is the single node that is currently in our cluster.工具