elasticsearch - Human readable, tabular cluster health with selected headers - elastic - elastic search - elasticsearch tutorial - elasticsearch docker



Human readable, tabular cluster health with selected headers

Example uses basic HTTP syntax. Any <#> in the example should be removed when copying it. Like most _cat APIs in , the API selectively responds with a default set of fields. However, other fields exist from the API if you want them:

GET /_cat/health?help <1>
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team

?help causes the API to return the fields (and short names) as well as a brief description.

_cat/health has existed since Elasticsearch 1.x, but here is an example of its output from Elasticsearch 5.x: Fields available as-of this example's creation date:

epoch                 | t,time                                   | seconds since 1970-01-01 00:00:00  
timestamp             | ts,hms,hhmmss                            | time in HH:MM:SS                   
cluster               | cl                                       | cluster name                       
status                | st                                       | health status                      
node.total            | nt,nodeTotal                             | total number of nodes              
node.data             | nd,nodeData                              | number of nodes that can store data
shards                | t,sh,shards.total,shardsTotal            | total number of shards             
pri                   | p,shards.primary,shardsPrimary           | number of primary shards           
relo                  | r,shards.relocating,shardsRelocating     | number of relocating nodes         
init                  | i,shards.initializing,shardsInitializing | number of initializing nodes       
unassign              | u,shards.unassigned,shardsUnassigned     | number of unassigned shards        
pending_tasks         | pt,pendingTasks                          | number of pending tasks            
max_task_wait_time    | mtwt,maxTaskWaitTime                     | wait time of longest task pending  
active_shards_percent | asp,activeShardsPercent                  | active number of shards in percent 

You can then use this to print only those fields:

GET /_cat/health?h=timestamp,cl,status&v <1>
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
  • h=... defines the list of fields that you want returned.
  • v (verbose) defines that you want it to print the headers.

The output from an instance of Elasticsearch 5.x:

timestamp cl            status
15:38:00  elasticsearch yellow

This elasticsearch tutorial provides fllowing articles and keypoints on hosted elasticsearch , elasticsearch monitoring , elasticsearch service , aws elastic search , elk elasticsearch , amazon elasticsearch , azure elasticsearch , aws elasticsearch , elastic , elastic search , elasticsearch logstash kibana , elasticsearch security , elasticsearch pricing , elasticsearch alternatives , elasticsearch hadoop , elasticsearch documentation , elasticsearch kibana , elastic co , elasticsearch , elasticsearch download , logstash elasticsearch , what is elasticsearch , elasticsearch vs mongodb , elasticsearch architecture , elasticsearch database , install elasticsearch , elasticsearch mongodb , elasticsearch document , elasticsearch marvel , elasticsearch shield , elasticsearch sense , elasticsearch analyzer , elasticsearch getting started , elasticsearch bulk , elasticsearch 5 , elasticsearch gui , elasticsearch tutorial

Related Searches to Human readable, tabular cluster health with selected headers