Splunk Search

How to search the average of one field by values of another field, then chart them side by side?

jasoholt
Engager

I am very new to Splunk and trying to learn manipulation like I would in Excel. My current task is to get an average of a result, and then display it by a device type. Let's assume the CSV looks like this:

DEVICE, RATIO
iphone, 20
iphone, 10
iphone, 15
samsung, 30
samsung, 12
samsung, 83

I want to get the average of the Ratios, by Device Type. And then Chart them side by side.

iphone 15
samsung 42

0 Karma

renjith_nair
Legend

Try this

your search |stats avg(RATIO) by DEVICE

OR

    your search |eventstats avg(RATIO) by DEVICE

If you want to repeat the values in each row

Happy Splunking!

renjith_nair
Legend

@jasoholt, please accept as 'answer' if it resolves your issue so that the thread will be closed

Happy Splunking!
0 Karma
Get Updates on the Splunk Community!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...