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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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