Splunk Search

Correlating transaction results

ellothere
Explorer

I have a dataset with timestamp, model, and ID. I am trying to correlate the events so that I can see all of the IDs that belong to a particular model. Typical logs look something like this:

{"time" : "2019-02-11 12:45:39", "model" : "alpha", "id" : "id1"}
{"time" : "2019-02-11 12:45:40", "model" : "alpha", "id" : "id2"}
{"time" : "2019-02-11 11:50:40", "model" : "alpha", "id" : "id2"}
{"time" : "2019-02-11 11:50:41", "model" : "alpha", "id" : "id3"}
{"time" : "2019-02-11 12:00:41", "model" : "alpha", "id" : "id4"}

From this data I made the search:

sourcetype="_json" id=* model=alpha
| rename model as "Model" date_minute as "Minute" date_mday as "Date" date_hour as "Hour" id as "ID"
| transaction "Model" maxspan=1m 
| sort - _time
| table "Model" "Date" "Hour" "Minute" "ID"

The problem becomes that the model=alpha has three IDs associated with it. Currently, my transaction groups them as firstCell={id1, id2} , secondCell={id2, id3} , and thirdCell={id4}. Is there a way I can produce something that looks like this firstCell={id1, id2, id3} and secondCell={id4} ?

Thank you all in advance!

0 Karma

adonio
Ultra Champion

not sure i understand your question, but ill give it a shot
you can use the different arguments that comes with the transaction command to align to your needs
https://docs.splunk.com/Documentation/Splunk/7.2.3/SearchReference/Transaction

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