Last active
February 12, 2019 20:34
-
-
Save portante/c801acce8ae275fdcfc743b346981b13 to your computer and use it in GitHub Desktop.
A simple script to display the "health" of an ES cluster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ES_URL='https://localhost:9200' | |
curl_get='curl -s -X GET --cacert /etc/elasticsearch/secret/admin-ca --cert /etc/elasticsearch/secret/admin-cert --key /etc/elasticsearch/secret/admin-key' | |
date | |
$curl_get $ES_URL/_cat/health?v | |
$curl_get $ES_URL/_cat/allocation?v\&h=node,host,ip,shards,disk.indices,disk.used,disk.avail,disk.total,disk.percent | |
# See https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-nodes.html for header meanings | |
$curl_get $ES_URL/_cat/nodes?v\&h=name,host,r,m,hc,hp,hm,rc,rp,rm,fdc,fdp,fdm,load,uptime | |
$curl_get $ES_URL/_cat/nodes?v\&h=name,host,r,m,fm,fe,qcm,qce,rcm,rce,rchc,rcmc,ft,ftt,rto,rti,sc,sm,siwm,siwmx,svmm | |
$curl_get $ES_URL/_cat/nodes?v\&h=name,host,r,m,gc,gto,gti,iic,iito,iiti,mc,mt,mtt,sfc,sfto,sfti,sqc,sqto,sqti | |
$curl_get $ES_URL/_cat/thread_pool?v\&h=host,bulk.rejected,bulk.completed,bulk.queue,bulk.queueSize,bulk.size,bulk.active,bulk.largest | |
$curl_get $ES_URL/_cat/thread_pool?v\&h=host,refresh.rejected,refresh.completed,refresh.queue,refresh.size,refresh.active,refresh.largest | |
$curl_get $ES_URL/_cat/thread_pool?v\&h=host,management.rejected,management.completed,management.queue,management.size,management.active,management.largest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is an example from a cluster with unassigned shards: