Splunk Search

Summary-Index: Is it possible to summary index the averages of two calculated fields in the same search?

hofer
Explorer

So i got this report running all 15min and saving into my summary index:

index=mbs_li host="vimapmop*" sourcetype=Message | timechart span=1m avg(Message_DURATION_whole) AS ms

Now there are 2 durations in an original event, one is the Message_DURATION_whole and one the Message_DURATION_part1.
I'd like to have both the averages (see search above) of them in my summary index event. These two fields are field extractions.
Is this possible or do I have to just add another report, which makes almost the same, but with the other duration?

Thank you very much

0 Karma
1 Solution

ngatchasandra
Builder

Hi hofer,

This is possible!

You will write your request like this:

index=mbs_li host="vimapmop*" sourcetype=Message | timechart span=1m avg(Message_DURATION_whole) AS ms, avg(Message_DURATION_part1) AS ms2 

View solution in original post

ngatchasandra
Builder

Hi hofer,

This is possible!

You will write your request like this:

index=mbs_li host="vimapmop*" sourcetype=Message | timechart span=1m avg(Message_DURATION_whole) AS ms, avg(Message_DURATION_part1) AS ms2 

juvetm
Communicator

Hi
can you try to use the eval commad i think this may help o solve you problem

0 Karma

hofer
Explorer

Thank you, ngatchasandra.
@juvetm, yes this is also possible, but unfortunately "eval" doesn't go with "avg". But for example a straight line, this works great.

0 Karma
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

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