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!

Index This | What did the zero say to the eight?

June 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

Splunk Observability Cloud's AI Assistant in Action Series: Onboarding New Hires & ...

This is the fifth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Now Playing: Splunk Education Summer Learning Premieres

It’s premiere season, and Splunk Education is rolling out new releases you won’t want to miss. Whether you’re ...