Splunk Search

How do i get average of the response times from the following sample ?data

chanukhya
Explorer

Hi Here is my sample data,

2016-05-27 08:36:30,497:INFO   :WebContainer : 12: Total time to execute service _prc:aaaa : 796 ms [system]: InvokeSOAPWebservice
2016-05-27 08:36:30,497:INFO   :WebContainer : 12: Total time to execute service _prc:aaaa : 7964 ms [system]: InvokeSOAPWebservice

2016-05-27 08:36:30,497:INFO   :WebContainer : 12: Total time to execute service _ord:bbb : 3796 ms [system]: InvokeSOAPWebservice
2016-05-27 08:36:30,497:INFO   :WebContainer : 12: Total time to execute service _prc:bbb : 1796 ms [system]: InvokeSOAPWebservice

How can i get average response times for the above data?

0 Karma
1 Solution

woodcock
Esteemed Legend

Like this:

... | rex "Total\s+time\s+to\s+execute\s+service\s+(?<service>\S+)\s+:\s+(?<response_time>\d+)"
| stats avg(response_time) BY service

View solution in original post

woodcock
Esteemed Legend

Like this:

... | rex "Total\s+time\s+to\s+execute\s+service\s+(?<service>\S+)\s+:\s+(?<response_time>\d+)"
| stats avg(response_time) BY service
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

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

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, ...