Splunk Search

How to generate a search that will calculate response time based on my event?

karthi2809
Contributor

I have to take response time from given 12/07/2016 07:36:49 :: :: 090A24936 Req. : 07:36:49:450 --- 090A24936 Reply : 07:36:49:872 event. can anyone help on this?

0 Karma

sundareshr
Legend

Try this

base search | rex "Req.*\s(?<start>\d+:\d+:\d+:\d+)[\s\S]+\s(?<end>\d+:\d+:\d+:\d+)" | eval start=strptime(start, "%H:"%M:"%S.%3N")  | eval end=strptime(end, "%H:"%M:"%S.%3N") | eval duration=end-start | eval duration=tostring(duration, "duration")
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...