Is there a way I can use "avg" aggregation to return just the "average
documents" in an hour/min/date-range?
What I am trying to do is this -
I have fed the Nginx server logs to elasticsearch, now I want to know whats
the average number of responses that returned 50x, 40x and 20x per hour for
last 5 hours.
Possible to do?
I could get the "for last 5 hours" part with date_histogram, also, 50x, 40x
and 20x part was easy using aggregation buckets. But couldn't find how to
get avg of "doc_count"
I think this could be done easily on client-side? For instance, you could
compute the total number of documents over the X past hours, and then you
would just have to divide by X to get the average per hour. Would this work
for you?
Is there a way I can use "avg" aggregation to return just the "average
documents" in an hour/min/date-range?
What I am trying to do is this -
I have fed the Nginx server logs to elasticsearch, now I want to know
whats the average number of responses that returned 50x, 40x and 20x per
hour for last 5 hours.
Possible to do?
I could get the "for last 5 hours" part with date_histogram, also, 50x,
40x and 20x part was easy using aggregation buckets. But couldn't find how
to get avg of "doc_count"
That definitely works, but since ES is already giving all the data neatly that can be directly plotted on graph without any logic or messing with keys, I thought it would be cleaner if ES had that option.
I think this could be done easily on client-side? For instance, you could compute the total number of documents over the X past hours, and then you would just have to divide by X to get the average per hour. Would this work for you?
Is there a way I can use "avg" aggregation to return just the "average documents" in an hour/min/date-range?
What I am trying to do is this -
I have fed the Nginx server logs to elasticsearch, now I want to know whats the average number of responses that returned 50x, 40x and 20x per hour for last 5 hours. Possible to do?
I could get the "for last 5 hours" part with date_histogram, also, 50x, 40x and 20x part was easy using aggregation buckets. But couldn't find how to get avg of "doc_count"
Any help would be appreciated.
Regards, Shrinath M
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.