4

how do i calculate average query and fetch time on my elasticsearch server. http://mysearver.com:9200/_stats gives me the query_time and fetch_time. But this values keep incrementing on each search. I need avg query time and fetch time of the querys and plot it on a graph.

I tried query_time/query_total , this value also increase on each query and then stays on that after the query has stopped.

This is what i have tried so far

url = 'http://localhost:9200/_stats'
raw_data = urllib2.urlopen(url)
data = json.loads(raw_data.readline())
QueryTime = data['_all']['total']['search']['query_time_in_millis']
QueryTotal = data['_all']['total']['search']['query_total']
AvgQueryTime = QueryTime/flaot(QueryTotal)
4

1 回答 1

3

Since your looking for aggregate overall performance, I think you should look at two other plugins:

  1. Bigdesk: http://bigdesk.org/

  2. HQ: http://www.elastichq.org/

Elasticsearch HQ will be very helpful in figuring out avg query and fetch times (click on node stats)

Bigdesk gives you real time graphs of search, fetch, index, delete, io, memory, and just about everything else.

I usually use those two plugins above as well as head and paramedic for day to day monitoring.

于 2013-11-26T01:32:15.700 回答