Splunk Search

normalize columns in timechart

splnk1391
Engager

Hi all

consider this search:

source=bandwidth | timechart sum(packets_in) by host

which will produce rows indexed by a timestamp, and columns headed by hostnames.

I'd like to scale values in each column via division by the average of that column.

How should I go about it? 

Many thanks.

Labels (1)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Assuming 1hr buckets

source=bandwidth 
| bin span=1h _time
| stats sum(packets_in) as packets_in by host _time
| eventstats avg(packets_in) as avg_in by host
| eval packets_in=packets_in/avg_in
| xyseries _time host packets_in

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Assuming 1hr buckets

source=bandwidth 
| bin span=1h _time
| stats sum(packets_in) as packets_in by host _time
| eventstats avg(packets_in) as avg_in by host
| eval packets_in=packets_in/avg_in
| xyseries _time host packets_in
0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...