1 개요[ | ]
- Elasticsearch - Cluster health API
- Elasticsearch API /_cluster/health
Console
Copy
$ 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
}
Console
Copy
$ 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
}
Console
Copy
$ 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
}
Console
Copy
$ 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 같이 보기[ | ]
- Elasticsearch API status
- Elasticsearch curl localhost:9200
- Elasticsearch master_not_discovered_exception
3 참고[ | ]
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.