How can i get the query time of each index on a nodes not all the cluster?


(尹川) #1

hello, all
I have a ES cluster(5 nodes, 2 indices, 10 shards per index). Now i want to
monitor the ES performance with Zabbix.

I can get total query time for each index with indices stats apihttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-stats.html.
this time is the sum of query time in all shards on all nodes for this
index.(Am i right?)

I also can get total query time for each nodes with nodes stats apihttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html.
this time is the sum of all shards(no matter which index it it belongs to)
on this nodes .(Am i right?)

now, my question is how can i get the query time of each index on a nodes
not all the cluster?
is there a API can do this? or can I calculate this value from other API?

Thanks! any advice is Appreciate.

--
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.


(Ivan Brusic) #2

I do not think this functionality is exposed, but it should be technically
possible. From what I understand from the code, the search stats are saved
per index and are then aggregated into the node stats.

Cheers,

Ivan

On Tue, Oct 8, 2013 at 6:32 AM, 尹川 yinchuan.blue@gmail.com wrote:

hello, all
I have a ES cluster(5 nodes, 2 indices, 10 shards per index). Now i want
to monitor the ES performance with Zabbix.

I can get total query time for each index with indices stats apihttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-stats.html.
this time is the sum of query time in all shards on all nodes for this
index.(Am i right?)

I also can get total query time for each nodes with nodes stats apihttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html.
this time is the sum of all shards(no matter which index it it belongs to)
on this nodes .(Am i right?)

now, my question is how can i get the query time of each index on a nodes
not all the cluster?
is there a API can do this? or can I calculate this value from other API?

Thanks! any advice is Appreciate.

--
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.

--
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.


(尹川) #3

Thanks for reply. I think adding a API to do this is not hard, so I
issuse a feature request on Github.

On Thu, Oct 10, 2013 at 12:44 AM, Ivan Brusic ivan@brusic.com wrote:

I do not think this functionality is exposed, but it should be technically
possible. From what I understand from the code, the search stats are saved
per index and are then aggregated into the node stats.

Cheers,

Ivan

On Tue, Oct 8, 2013 at 6:32 AM, 尹川 yinchuan.blue@gmail.com wrote:

hello, all
I have a ES cluster(5 nodes, 2 indices, 10 shards per index). Now i want
to monitor the ES performance with Zabbix.

I can get total query time for each index with indices stats api. this
time is the sum of query time in all shards on all nodes for this index.(Am
i right?)

I also can get total query time for each nodes with nodes stats api. this
time is the sum of all shards(no matter which index it it belongs to) on
this nodes .(Am i right?)

now, my question is how can i get the query time of each index on a nodes
not all the cluster?
is there a API can do this? or can I calculate this value from other API?

Thanks! any advice is Appreciate.

--
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.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/XbZflyo_5iU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
一片树林里分出两条路——
而我选择了人迹更少的一条,
从此决定了我一生的道路。
Site: www.chuan-small.me

--
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.


(尹川) #4

from @imotov

It's already there. You just need to add level=shards to your request. Try this:

$ curl "localhost:9200/_stats?pretty&level=shards"

On Thu, Oct 10, 2013 at 11:40 AM, 尹川 yinchuan.blue@gmail.com wrote:

Thanks for reply. I think adding a API to do this is not hard, so I
issuse a feature request on Github.

On Thu, Oct 10, 2013 at 12:44 AM, Ivan Brusic ivan@brusic.com wrote:

I do not think this functionality is exposed, but it should be technically
possible. From what I understand from the code, the search stats are saved
per index and are then aggregated into the node stats.

Cheers,

Ivan

On Tue, Oct 8, 2013 at 6:32 AM, 尹川 yinchuan.blue@gmail.com wrote:

hello, all
I have a ES cluster(5 nodes, 2 indices, 10 shards per index). Now i want
to monitor the ES performance with Zabbix.

I can get total query time for each index with indices stats api. this
time is the sum of query time in all shards on all nodes for this index.(Am
i right?)

I also can get total query time for each nodes with nodes stats api. this
time is the sum of all shards(no matter which index it it belongs to) on
this nodes .(Am i right?)

now, my question is how can i get the query time of each index on a nodes
not all the cluster?
is there a API can do this? or can I calculate this value from other API?

Thanks! any advice is Appreciate.

--
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.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/XbZflyo_5iU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
一片树林里分出两条路——
而我选择了人迹更少的一条,
从此决定了我一生的道路。
Site: www.chuan-small.me

--
一片树林里分出两条路——
而我选择了人迹更少的一条,
从此决定了我一生的道路。
Site: www.chuan-small.me

--
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.


(system) #5