Splunk Search

blending field values with transactions for stats

twistedsixty4
Path Finder

Hey everyone,

I am trying to blend field values from subcategory events that are related by a key. I can group them together with a transaction, but when i try to stats the values into a report separated by their subcategory the fields don't stick. let me draw a mock table...

Catagory: OrderID: UserID: EmpID:
order_placed 10101 abc1234
processing 10101 5678910
shipped 10101 5678910

the regular logs have specific fields, but in the generated report i need individual lines for each catagory of event, but with all the related fields filled so it would look like this:

Catagory: OrderID: UserID: EmpID:
order_placed 10101 abc1234 5678910
processing 10101 abc1234 5678910
shipped 10101 abc1234 5678910

any help on this? i know i'm missing something here..

1 Solution

martin_mueller
SplunkTrust
SplunkTrust

So you essentially want to fill empty UserID and EmpID values by OrderID? Try something like this:

... | eventstats values(UserID) as UserID values(EmpID) as EmpID by OrderID | ...

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

So you essentially want to fill empty UserID and EmpID values by OrderID? Try something like this:

... | eventstats values(UserID) as UserID values(EmpID) as EmpID by OrderID | ...

twistedsixty4
Path Finder

this is perfect, i'm testing now, but it seems to fix my problems, thanks!

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 ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...