I've been working on a simple site plugin to watch segments and merges in
real time, but I'm running into some trouble. When calling
//_segments/ to retrieve the segments in an index, it appears that
ES randomly orders the results. There is also no indication of a shard ID
like the /_cluster/state/ API returns. This is making it very difficult to
graph the segments, because there is no discernible difference between
shards other than the node and primary status.
E.g. on one request:
"indices": {
"test": {
"shards": {
"0": [
{
"routing": {
"state": "STARTED",
"primary": false,
"node": "J47gdOIwQMq2GTmzzmzJBA"
},
[...]
And on a subsequent request:
"indices": {
"test": {
"shards": {
"0": [
{
"routing": {
"state": "STARTED",
"primary": true,
"node": "kH152vsLTL-y20mcLFs9GQ"
},
[...]
As you can see, the first position (shard[0]) lists different nodes but no
way to distinguish which shard it belongs to on the local node. Is there a
better way to query this data? I suppose I could concatenate all the
shards on a node into a single graph...but it would be much more
informative if I can keep the various primaries and replicas separated.
Thanks!
-Zach
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.