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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...