Skip to content

Instantly share code, notes, and snippets.

@untergeek
Created September 16, 2012 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save untergeek/3732511 to your computer and use it in GitHub Desktop.
Save untergeek/3732511 to your computer and use it in GitHub Desktop.
Segment count per index
for index in $(ls /data/ES/elasticsearch/nodes/0/indices/); do echo -n "$index " ; curl -s -XGET "http://localhost:9200/$index/_segments?pretty=true" | grep committed_segments | awk -F: '{print $2}' | awk -F, '{sum += $1}; END {print sum}' | tail -1; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment