pretty 사용시 기본은 예쁘게 json을 볼 수 있다.


[/usr/local/elasticsearch-5.3.1/bin] curl 'localhost:9200/_cluster/health?pretty'

{

  "cluster_name" : "elasticsearch",

  "status" : "yellow",

  "timed_out" : false,

  "number_of_nodes" : 1,

  "number_of_data_nodes" : 1,

  "active_primary_shards" : 60,

  "active_shards" : 60,

  "relocating_shards" : 0,

  "initializing_shards" : 0,

  "unassigned_shards" : 41,

  "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" : 59.4059405940594

}





format=yaml 매개 변수를 사용하면 yaml 형태로 정보를 얻을 수 있다.



[/usr/local/elasticsearch-5.3.1/bin] curl 'localhost:9200/_cluster/health?pretty&format=yaml'

---

cluster_name: "elasticsearch"

status: "yellow"

timed_out: false

number_of_nodes: 1

number_of_data_nodes: 1

active_primary_shards: 60

active_shards: 60

relocating_shards: 0

initializing_shards: 0

unassigned_shards: 41

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: 59.4059405940594

Posted by 김용환 '김용환'

댓글을 달아 주세요