Splunk Search

time delay

chaitu99
Explorer

Hi,

10:27:xx.xxx Message 1
10:31:xx.xxx Message 1
10:35:xx.xxx Message 1
10:38:xx.xxx conf msg
10:82:xx.xxx Message 2
10:85:xx.xxx req xyz
10:87:xx.xxx Message 2
10:89:xx.xxx Message 2

i've sample log like this. here i need to find the delay(time difference) between Message 1 before "conf msg" and Message 2 immediate next to "req xyz" in a single event.

i used query like this and am not getting the expected result

transaction startswith=("Message 1") endswith=("Message 2")|search ("conf msg")|stats count perc95(duration) as VALUE

is there any logic to get the exact result?

0 Karma

ShaneNewman
Motivator

It would help to see the rest of the event to know what fields are available to create a mvlist. What I have done, similar to what you are wanting to do, is broken out the entire event into 5 or 6 fields, then group them by the field that is common to that transaction... Such as ip_address. This is much easier when you setup a transactiontypes.conf for the transaction you are looking to create.

Example of transaction from transactiontypes.conf:

[event_collection]
fields = ip_address
startswith ="Login"
endswith ="Submit"
mvlist = event_type, event_timestamp, ip_address, user_id

Hope this helps!

0 Karma
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 ...