How to calculate minimum and maximun of Session duration

Hello everyone!!

i am new to Kibana and i lik to know how to calculate the minimum and maximum of a session. Thanks for your help.

Hi @ITchandj,

Kibana provides "Max" and "Min" aggregations for that:

  1. Simply go to Visualize > Create new > Data Table.
  2. In the Buckets section add 1 date histogram (for "Last seen") and 3 Terms aggregations: 1 for the host, another one for the Hardware manufacturer, and the last one for Hardware model.
  3. Then in the Metrics section, select the Aggregation "Min" and field "sessions", and repeat the process for Max and Top Hit (for Last).

thank you very much but i would like rather calculate the minimum and maximum duration of a session in kibana.
for exemple the min and max of sessionlogonTime.

Oh! So the 1 in the screenshot of the first comment is actually the number of seconds/minutes/hours of the session?

yes.. it is

I'm struggling to understand how you get a duration out of 1 static date. Do you have any other field like SessionLogoutTime, so you can calculate the duration as SessionLogoutTime - SessionLogonTime?

No.. but i have field like SessionEndTime.
but i how can calculate the minimum and the max

The Min and Max aggregations work for numbers and dates. So you can get the minimum SessionLogonTime in the same way I mentioned in my previous comment.

If you are after the duration, you might need to use a Runtime field or Kibana Scripted field that will execute SessionEndTime - SessionLogonTime and present it in another field in the document.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.