Splunk Search

How to Collate Events By Matching String?

ZCAMZ
Loves-to-Learn Lots

Hi All,

Im trying use Splunk to produce a table which will highlight the duration between the RUNNING event of one and the SUCCESS event of another Autosys job.

In this case the start job for each environment is denoted by a prefix ending *START_COMP_0 and the last job is *OSMPCONTROL_0.

If I only compare a single environment (ENV1...) then the search works fine however I would like to grab the duration between two events for multiple environments (ENV1, ENV2...).  Using the SPL below or something similar, is it possible to group the ENVs together based on matching string? 

Multiple Envs:

index=_* OR index=* sourcetype=autosys_vm1_event_demon AND (JobName=DWP_VME_DLACS_*_START_COMP_0 Status=RUNNING) OR (JobName=DWP_VME_DLACS_*_OSMPCONTROL_0 Status=SUCCESS)
| transaction maxevents=2
| table JobName duration _time

I have attached two screenshots, one of a single env which gives me my desired output and one where I stick a * in the search and how the search is grouping multiple events.

Multiple: 

multiplemultiple

Single working:

working singleworking single

TIA, Cameron. 

 

Labels (3)
0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

when You are using transaction You should use  startswith and endswith parameters to match start and end correctly. Also you should use some field which match those to correct job.

r. Ismo

0 Karma
Get Updates on the Splunk Community!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...