Splunk Search

How to calculate average of response time in seconds

Madhusri
Engager

Hi,

I need to calculate average of response time in seconds for my application.

 

Query i am using

index="prod*_ping*"  source="*splunk-audit.log" "event=SSO" connectionid=*
| stats avg(responsetime) as AvgRespTimeInSec by connectionid

In connectionid i will get the application details

Madhusri_0-1630643120981.png

Please let me know whether my query is correct for calculating the average of response time in seconds?

 

Regards,

Madhusri R

 

 

Labels (1)
Tags (1)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

Of course it depends on your data whether it makes sense or not but in general, | stats avg(field) is indeed the way to calculate average of field values.

0 Karma

Madhusri
Engager

Thanks @PickleRick 

Then the average of my response time is calculating in seconds right?

 

Regards,

Madhu R

0 Karma

PickleRick
SplunkTrust
SplunkTrust

Depends on your source data. If the field itself is measured in seconds then the average of the values in that field will be also in seconds.

Otherwise you might want to use eval to multiply or divide the value to other unit.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

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

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...