Splunk Search

Is there a way in Splunk to compare and find delta of the duration from the previous runs?

maniishpawar
Path Finder

Hi All,

We are generating a log that records in and out timestamp in epoch for a specific set of transactions and we have been doing this for a while. In order to test this api, we run our load test at specific times for 1 hour and that generate the logs with transaction ids, keywords and the in and out timestamps etc. see the sample below.

We are querying this data and calculating duration.  Is there a way in splunk to compare and find delta of the duration from the previous runs.

Every run has a specific timestamps and we were adding it in the SPL itself like earliest="08/23/2022:20:45:00" latest="08/23/2022:21:55:00"

=============================================================

sample log

2022/08/23 21:54:38,918 INFO [XXXX.CPU_LITE @67166e0a] [LoggerMessageProcessor ] [ ] [ ] [] - End Workflow: flow1 | LogID: 104 |{
"Trans-Id": "cf18655a-5d1a-4867-b500-c4ba5bee9333",
"AppId": "somepapi"
} | OutTimestamp : 1661306078918
2022/08/23 21:54:37,819 INFO [XXXX.CPU_INTENSIVE @2c86def1] [LoggerMessageProcessor ] [ ] [ ] [] - Start Workflow: flow1 | LogID: 104 |{
"Trans-Id": "cf18655a-5d1a-4867-b500-c4ba5bee9333",
"AppId":"somepapi"
} | InTimestamp : 1661306077819

Labels (5)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

How do you identify from the previous log events, which is the corresponding previous run, e.g. would "Start Workflow: flow1 | LogID: 104" in this run have a corresponding "Start Workflow: flow1 | LogID: 104" in the previous run?

0 Karma

maniishpawar
Path Finder

I am not sure if I follow your question. But yes it will have corresponding start and end flow but transid are different. Events are in a pair of start workflow and end workflow, there is a common transid between these two events, which is auto generated. 

What I am trying to find out is below. 

In the month of July lets say there were 1 million event pairs ( so total count 2 mil)  and these transactions have average of 1second response time or duration. 

I want to compare this with the month of Aug , where we currently have 900,000 event pairs. I want to find how much delta/deviation we are seeing as compared to July in a chart.

Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

So, for each pair, do you already know how to calculate the duration?

Are you just after determining the average for each month?

| bin _time span=mon
| stats avg(duration) as avg_duration by _time
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...