Splunk Search

How can I condense this search?


I have this search

| eval max = round(max, 2)
| eval avg = round(avg, 2)
| eval median = round(median,2)
| eval min = round(min, 2)

but I want to condense this search to just 1 line.

Can I do this?

0 Karma


You can club it in your aggregation function itself.

Eg :

index=*|stats count  as number by sourcetype
|chart eval(round(avg(number),2)) as avg,eval(round(max(number),2)) as max,eval(round(min(number),2)) as min
Happy Splunking!


thank you for your answer.
And I found "foreach".

0 Karma
Get Updates on the Splunk Community!

Announcing the 1st Round Champion’s Tribute Winners of the Great Resilience Quest

We are happy to announce the 20 lucky questers who are selected to be the first round of Champion's Tribute ...

We’ve Got Education Validation!

Are you feeling it? All the career-boosting benefits of up-skilling with Splunk? It’s not just a feeling, it's ...

What’s New in Splunk Cloud Platform 9.1.2308?

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