Splunk Search

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

karthi2809
Builder

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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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