How can show the shards of per nodes in elasticsearch 5.4.2 cluster with api search(curl)?


(andy_zhou) #1

how can show the shards of per nodes in elasticsearch 5.4.2 cluster with api search(curl)?


(andy_zhou) #3

need the result like x-pack monitoring ,no the all
like.


(Christian Dahlqvist) #4

Try something like this: curl -XGET http://localhost:9200/_cat/shards | grep -v UNASSIGNED | awk '{print $8}' | sort | uniq -c


(andy_zhou) #5

thanks.
can give a curl to know how about the status of relocating_shards (like x-pack monitoring)


(Christian Dahlqvist) #6

I am not sure that is available via the cat APIs, so that may require a script.


(andy_zhou) #7

can give me a example.
thanks so much...


(Christian Dahlqvist) #8

I do not have such an example.


(andy_zhou) #9

:joy::joy::joy::joy::joy::joy::joy::joy::joy:
thanks. so.


(andy_zhou) #10

can't only show as like only know the status of relocation


(Christian Dahlqvist) #11

I am sorry, but I do not understand.


(system) #12

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.