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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...