[ Get the average number of an unique count ]


#1

Hello,

I need some help for a query.

My documents are Apache access logs and they have a "jsessionid" field (string) and a JVM field (string).

I would like to get the average number of unique count of jsessionid per JVM for a given period; to display it on a line chart. So that I will have an indicator of the average number of sessions in my JVMs.

Could someone help me in building this query ? Maybe I need some scripted field ?

Thanks for your help
Regards
Jérôme


(Mark Walkom) #2

I think you'd need pipeline aggs for this, to count each ID and then get the overall average.
These aren't yet in KB though.


#3

Thank you for the answer.
So I will try to find some examples of "pipeline aggs"

If someone has some information about that, or an idea about how to implement it for my use case; it would be nice to share :slight_smile:

Best regards
Jérôme


(system) #4