"Elasticsearch API / cluster/health"의 두 판 사이의 차이

(새 문서: ==개요== ;Elasticsearch - Cluster health API ;Elasticsearch API cluster/health <source lang='console'> $ curl -u elastic:elastic localhost:9200/_cluster/health { "cluster_name"...)
 
 
(같은 사용자의 중간 판 9개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{DISPLAYTITLE:Elasticsearch API /_cluster/health}}
==개요==
==개요==
;Elasticsearch - Cluster health API
;Elasticsearch - Cluster health API
;Elasticsearch API cluster/health  
;Elasticsearch API /_cluster/health


<source lang='console'>
<source lang='console'>
$ curl -u elastic:elastic localhost:9200/_cluster/health
$ curl 'localhost:9200/_cluster/health?pretty'
{
  "cluster_name" : "elasticsearch",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 3,
  "number_of_data_nodes" : 3,
  "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
}
</source>
<source lang='console'>
$ curl -u elastic:elastic localhost:9200/_cluster/health?pretty
{
{
   "cluster_name" : "testcluster",
   "cluster_name" : "testcluster",
24번째 줄: 45번째 줄:
</source>
</source>
<source lang='console'>
<source lang='console'>
$ curl -u elastic:elastic localhost:9200/_cluster/health
$ curl -u elastic:elastic 'localhost:9200/_cluster/health?pretty&timeout=3s'
{
{
   "cluster_name": "testcluster",
   "cluster_name": "testcluster",
41번째 줄: 62번째 줄:
   "task_max_waiting_in_queue_millis": 0,
   "task_max_waiting_in_queue_millis": 0,
   "active_shards_percent_as_number": 51.24999999999999
   "active_shards_percent_as_number": 51.24999999999999
}
</source>
<source lang='console'>
$ curl -u elastic:elastic 'localhost:9200/_cluster/health?pretty&timeout=3s'
{
  "error": {
    "root_cause": [
      {
        "type": "master_not_discovered_exception",
        "reason": null
      }
    ],
    "type": "master_not_discovered_exception",
    "reason": null
  },
  "status": 503
}
}
</source>
</source>
46번째 줄: 83번째 줄:
==같이 보기==
==같이 보기==
* [[Elasticsearch API  status]]
* [[Elasticsearch API  status]]
 
* [[Elasticsearch curl localhost:9200]]
* [[Elasticsearch master_not_discovered_exception]]
==참고==
==참고==
* https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html
* https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html


[[분류: Elasticsearch API]]
[[분류: Elasticsearch API]]

2020년 3월 3일 (화) 18:52 기준 최신판

1 개요[ | ]

Elasticsearch - Cluster health API
Elasticsearch API /_cluster/health
$ curl 'localhost:9200/_cluster/health?pretty'
{
  "cluster_name" : "elasticsearch",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 3,
  "number_of_data_nodes" : 3,
  "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
}
$ curl -u elastic:elastic localhost:9200/_cluster/health?pretty
{
  "cluster_name" : "testcluster",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 1,
  "active_shards" : 1,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 1,
  "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": 50.0
}
$ curl -u elastic:elastic 'localhost:9200/_cluster/health?pretty&timeout=3s'
{
  "cluster_name": "testcluster",
  "status": "yellow",
  "timed_out": false,
  "number_of_nodes": 1,
  "number_of_data_nodes": 1,
  "active_primary_shards": 41,
  "active_shards": 41,
  "relocating_shards": 0,
  "initializing_shards": 0,
  "unassigned_shards": 39,
  "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": 51.24999999999999
}
$ curl -u elastic:elastic 'localhost:9200/_cluster/health?pretty&timeout=3s'
{
  "error": {
    "root_cause": [
      {
        "type": "master_not_discovered_exception",
        "reason": null
      }
    ],
    "type": "master_not_discovered_exception",
    "reason": null
  },
  "status": 503
}

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}