How to do it...

Follow these steps to use a bar chart to show average amount spent by category:

  1. Log in to your Splunk server.
  2. Select the default Search & Reporting application.
  3. Ensure that the time range picker is set to Last 24 hours, and type the following search into the Splunk search bar. Then, click on Search or hit Enter:
index=main sourcetype=log4j | transaction sessionId  maxspan=30m | search requestType="checkout" | stats  avg(total) AS Avg_Spent by category
  1. Splunk will return a tabulated list, detailing the category and the associated average amount spent.
  2. Click on the Visualization tab and select Bar Chart from the drop-down list of visualization types to see the data represented as a bar chart, as shown in the following screenshot: ...

Get Splunk Operational Intelligence Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.