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 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...