All Apps and Add-ons

Track process statuses using transactions

baegoon
Explorer

I have log events that track incidents. Each log event has a ticket ID My work flow consists of 8 steps A,B,C,D,E,F,G,H. A is START, G is SUCCESS| FAIL and H is END, E is NEEDSATTENTION.

I am using the Splunk transaction command. However if I want to track Start to NEEEDSATTENTION then I get all transactions that have NEEDSATTENTION but I also get some that have gone pass this process to either SUCCESS FAIL or END. How can I only get transactions that have reached the NEEDSATTENTION process?

IS this something that needs to be a "multisearch"?

For Example index=incidents | transaction ticketid startswith=eval(workstatus="START")) endswith=eval(workstatus="NEEDSATTENTION")) | table ticketID userFirstName userLastName businessUnit duration

0 Karma

DalJeanis
Legend

Transaction is the wrong tool for this. It's useful for some use cases, but this one isn't it.

index=incidents 
| fields ticketID userFirstName userLastName businessUnit workstatus
| eventstats range(_time) as duration latest(workstatus) as currentstatus by ticketID
| where currentstatus="NEEDSATTENTION"

This gives you every record for any ticketID whose current status is "NEEDSATTENTION". Each record contains the total duration, defined as the number of seconds (epoch time) between the earliest _time and the latest _time. At this point, you probably want to just roll them together with a stats command.

| stats values(*) as * by ticketID

The last may need some finessing if some of the records contain different data from others. For instance, if you only wanted the latest userFirstName and userLastName, and so on.

0 Karma

baegoon
Explorer

OK I am now investigating this!

0 Karma

kmorris_splunk
Splunk Employee
Splunk Employee

You may want to verify that workstatus="NEEDSATTENTION" is correct. Using endswith should work, unless the events are coming in out of order or something.

0 Karma

kmaron
Motivator

Do you always have a very specific number of steps for the type of grouping you're looking for? If you do you can use eventcount to filter out the ones that go past your NEEDSATTENTION. It tells you how many events were grouped into your transaction so you could do a where eventcount<7

0 Karma

baegoon
Explorer

As far as steps not really, the event count may fail in certain cases.
For example step C is an informational step as the case information gets populated then there are multiple step C's.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...