Follow the steps in this recipe to calculate the average session time on a website:
- Log in to your Splunk server.
- Select the Operational Intelligence application.
- Ensure the time range picker is set to Last 24 Hours, and type the following search into the Splunk search bar. Then, click on the magnifying glass button or hit Enter:
index=main sourcetype=access_combined | transaction JSESSIONID | stats avg(duration) AS Avg_Session_Time
- Splunk will return a single value representing the average duration in seconds for a session on the website.
- Click on the Visualization tab.
- Since there are a number of visualizations within Splunk, the single-value visualization might not be displayed by default within the Visualization