Splunk Search

How to calculate average response time by day per request type?

nlrdy
Explorer

Hello,

I was able to get the chart with below fields. Now my question is how do I calculate average response time ((NA+EMEA+APAC)/3) for each web service request for each day ?

alt text

Tags (3)
0 Karma
1 Solution

somesoni2
Revered Legend

Just add following to your current search

your current search | eventstats avg(avg_response) as DailyAvg by Time Request

View solution in original post

somesoni2
Revered Legend

Just add following to your current search

your current search | eventstats avg(avg_response) as DailyAvg by Time Request

nlrdy
Explorer

Works perfectly !!. Thank you.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Assuming you have events with timestamp, Request, DC, and response fields, you can do something like this:

base search returning those events | bin span=1d _time | stats avg(response) as avg_response by DC Request | timechart avg(avg_response) by Request

That's assuming you want to average per DC first, then average those again. Alternatively, you could average over all DCs together like this:

base search returning those events | timechart avg(response) by Request

nlrdy
Explorer

The chart should still be present with aggregated values. is this possible without using dashboard ?

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...