I have logs with the fields:
. IP
. Timestamp
. URI
. SessionId
Each log shows the time (timestamp) the URI was visited. The SessionId is a field I created by concatenating IP with Timestamp (without the minutes or seconds). That is, all the logs belonging to the same day and hour are grouped into the same SessionId.
Now, I need to know the top URI that were the last ones to be visited in the sessions.
That is, for the example above, "youtube.com" was the last URI visited in the following sessions:
. 1.2.3.4_25-12-2017_8
. 1.2.3.4_25-12-2017_9
. 4.3.2.1_30-12-2017_15
Therefore, I need a visualization/query that indicates something like:
URI Count youtube.com 3
I've tried doing a couple split rows aggregations and filters but none of them gets me the result I want.
I don't think we can get you all of the way there in Kibana, but we can get you pretty close
Under Metrics, select "Top Hit". For the "Field", select cs_uri.keyword. For the "Sort On", select timestamp.
Under Buckets, select "Split Rows". For the aggregation, select "Terms" and for the "Field" select session_id.keyword.
This will give you a list of all of the last cs_uris for each session_id. Unfortunately, that's the best we can do (that I can figure), but you could export it as CSV, import to something like Excel, and manually compute the count.
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.