Splunk Search

How to create transaction based on event data?

joesrepsolc
Communicator

So I'm trying to build a transaction based on events I am getting from a log. I'm struggling how to set the transaction command to look for the "jobname" and grab all the events between a "Job started" event and "Job ended" event. this can vary from 2 to 12 unique event logs. So how can I tell Splunk whenever you see a "Job started" in the event, create a transaction including the events all the way up to a "Job ended" event?

|transaction jobname ?????

based on the example, jobname = "JobName ABC" (created with regex)

(event 5)Informational May 24, 2019 2:42:47 PM CDT Transaction "JobName ABC": Job ended
(event 4)....
(event 3)....
(event 2)....
(event 1)Informational May 24, 2019 2:40:17 PM CDT Transaction "JobName ABC": Job started

Thanks for any help. Joe

0 Karma

jnudell_2
Builder

Try this:
| transaction jobname startswith="Job started" endswith="Job ended"

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...