Splunk Search

How to divide the results of a timechart by statement?

robertlynch2020
Influencer

Hi

I have a basic statement, however, I want the answers to be in per second. So I need to provide all the results by 60, however, as I am using the by command I cant do something like eval count = count/60. As all the columns are different - I might be able to use a for - but this might affect _time. Any ideas? Am i missing something simple hear?

 

index="murex_logs" 

| timechart span=1m count by mx.env

 

 

 

 

robertlynch2020_0-1653475015949.png

 

 

 

Labels (1)
Tags (1)
0 Karma

somesoni2
Revered Legend

With dynamic columns, you'd use foreach command. Like this:

index="murex_logs" 
| timechart span=1m count by mx.env
| foreach * [| eval "<<FIELD>>"=round('<<FIELD>>'/60,2)]

"<<FIELD>>" is a literal string to be used as-is. See more information on foreach command here: https://docs.splunk.com/Documentation/Splunk/8.2.6/SearchReference/Foreach

0 Karma

Software-Simian
Path Finder
index="murex_logs"
| bucket span=1min _time
| stats count by mx.enc _time
0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...