Splunk Search

How to merge events that are +/- 2 minutes apart into one single event using Transaction or Stats.

cedmarjls32
New Member

I have the following table and even if some of the events don’t indicate the same minute, they are part of the same incident (in my example, the three lines at the top and the two lines at the bottom).

I’d like to know how to merge the lines with different timestamps, based on the following rule: events with no more than 2 minutes difference between them = one single event.

customer    description status  timedown
customer    IP Switch   DOWN    03/06/2015 15:53
customer    IP Switch   DOWN    03/06/2015 15:53
customer    IP Switch   DOWN    03/06/2015 15:51
customer    IP Switch   DOWN    03/06/2015 15:28
customer    IP Switch   DOWN    03/06/2015 15:28
customer    IP Switch   DOWN    03/06/2015 15:28
customer    IP Switch   DOWN    03/06/2015 14:38
customer    IP Switch   DOWN    03/06/2015 14:38
customer    IP Switch   DOWN    03/06/2015 14:38
customer    IP Switch        DOWN   03/06/2015 13:52
customer    IP Switch   DOWN    03/06/2015 13:51

I’ve been told that Transactionwas a CPU nightmare so I’d like if possible to avoid using it. I believe this can also be achieved with Stats?

Tags (2)
0 Karma
1 Solution

woodcock
Esteemed Legend

I do try to avoid transaction whenever possible but your use case is a good fit so try this:

... | transaction maxpause=2m customer description

View solution in original post

0 Karma

woodcock
Esteemed Legend

I do try to avoid transaction whenever possible but your use case is a good fit so try this:

... | transaction maxpause=2m customer description
0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...