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!

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

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

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...