Hi Shrinath,

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?


On Mon, Apr 14, 2014 at 8:41 AM, Shrinath M <[email protected]> wrote:

> 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.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/9f0d44b0-e4da-42f4-b446-d7d5a6018907%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/9f0d44b0-e4da-42f4-b446-d7d5a6018907%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Adrien Grand

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j6%2BmQzDZYGoZF4HURDpaXMoJP-c0j-_Mj9epwZovo7Lgg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to