My entries in Elasticsearch are logs of different event. I am trying to group the logs into sessions of users based on an attribute of the logs. Each log has action attribute, everytime there is the action "session_start" it means a new session was started and all the logs until the next action with "session_start" are related to one session. What I want to do is create some visualization based on the sessions.
My first question is how can I split the logs into sessions which I can later analyze? I was trying to add an id to all entries which belongs to one session but I am having trouble doing that using painless as I cannot increase the values of id per iteration.
After that depending of course, of how I did the split into sessions, is there some tutorial that can walk me through creating visualizations?