Created
September 26, 2017 09:08
-
-
Save gfdsa/037768ea0c7a14f13ab304ead30f4dd7 to your computer and use it in GitHub Desktop.
collect els conf
This file contains 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
function getjson { | |
uri=$1 | |
file=$2 | |
[ ${uri: -1} == "&" ] && uri=${uri}pretty || uri=${uri}?pretty | |
curl -o ${file}.json -s $base$uri || { echo "Failed to curl $base$uri to ${file}.json"; exit 1; } | |
} | |
base="$1" | |
[ x$base == "x" ] && { echo "Provide a base url as argument 1"; exit 1; } | |
getjson "/_cluster/health" health | |
getjson "/_nodes/" nodes | |
for k in settings os process jvm thread_pool transport http plugins; do | |
getjson /_nodes/$k $k | |
done | |
getjson /_stats stats | |
getjson "/_shard_stores?status=green,yellow,red&" shard_stores |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment