<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic What is the best way to join/combine/correlate fields from separate events with separate UIDs? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250528#M74835</link>
    <description>&lt;P&gt;Scenario:&lt;BR /&gt;
I am searching email event logs.  I can find some of the needed fields by a unique id (UID) and I find some fields by diffferent unique id (X-UID).  Some events contain both UID and X-UID but not all the fields I need.&lt;/P&gt;

&lt;P&gt;Here is a sample of the code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[search index=mail sourcetype=xemail subject = "Blah" |stats count by UID| fields UID] 
    |stats list(subject) as subj list(sender) as sender list(recipient) as recp list(vendor_action) as status by UID 
[search index=mail sourcetype=xemail sender = "sender@domain.com" |stats count by XUID| fields XUID] 
    |stats list(dest) as dest_ip list(sender) by XUID 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ultimately I would like results to show&lt;BR /&gt;
subj sender recp status dest_ip&lt;/P&gt;

&lt;P&gt;Thank you &lt;/P&gt;</description>
    <pubDate>Wed, 16 Mar 2016 18:41:33 GMT</pubDate>
    <dc:creator>packet_hunter</dc:creator>
    <dc:date>2016-03-16T18:41:33Z</dc:date>
    <item>
      <title>What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250528#M74835</link>
      <description>&lt;P&gt;Scenario:&lt;BR /&gt;
I am searching email event logs.  I can find some of the needed fields by a unique id (UID) and I find some fields by diffferent unique id (X-UID).  Some events contain both UID and X-UID but not all the fields I need.&lt;/P&gt;

&lt;P&gt;Here is a sample of the code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[search index=mail sourcetype=xemail subject = "Blah" |stats count by UID| fields UID] 
    |stats list(subject) as subj list(sender) as sender list(recipient) as recp list(vendor_action) as status by UID 
[search index=mail sourcetype=xemail sender = "sender@domain.com" |stats count by XUID| fields XUID] 
    |stats list(dest) as dest_ip list(sender) by XUID 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ultimately I would like results to show&lt;BR /&gt;
subj sender recp status dest_ip&lt;/P&gt;

&lt;P&gt;Thank you &lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 18:41:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250528#M74835</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-03-16T18:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250529#M74836</link>
      <description>&lt;P&gt;Some sample data would help.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 20:01:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250529#M74836</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-03-16T20:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250530#M74837</link>
      <description>&lt;P&gt;Try this - I don't think it is exactly what you want, but it should be closer&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=mail sourcetype=xemail 
| stats values(subject) as subject values(sender) as sender values(recipient) as recipient 
     values(vendor_action) as status values(dest_ip) as dest_ip by UID
| append [ search index=mail sourcetype=xemail 
     | stats values(subject) as subject values(sender) as sender values(recipient) as recipient 
          values(vendor_action) as status values(dest_ip) as dest_ip by XUID ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Your original search seems overcomplicated.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 20:14:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250530#M74837</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-03-16T20:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250531#M74838</link>
      <description>&lt;P&gt;Thank you for the suggestion, I will give it a try.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 21:08:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250531#M74838</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-03-16T21:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250532#M74839</link>
      <description>&lt;P&gt;I made a mistake the Key is "sender".&lt;/P&gt;

&lt;P&gt;The logs I need to join/correlate will have the sender in common.&lt;/P&gt;

&lt;P&gt;For example&lt;BR /&gt;
Fields UID are subject, sender, recipient, vendor_action&lt;BR /&gt;
Fields XUID are sender, dest&lt;/P&gt;

&lt;P&gt;Unfortunately I can release the actual data.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 21:14:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250532#M74839</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-03-16T21:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250533#M74840</link>
      <description>&lt;P&gt;So, if they share the &lt;CODE&gt;sender&lt;/CODE&gt; field, how do you distinguish two conversations by the same sender?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 22:23:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250533#M74840</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-03-16T22:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250534#M74841</link>
      <description>&lt;P&gt;Hi Lisa,&lt;BR /&gt;
To explain the apparent "over-complication".   The fields I want are in separate events, so I need a key (e.g. UID) to correlate all the events from a specific email session, giving me results with subj, sender, recipient, etc. with the same UID.   IF you know a better way to accomplish that I will definitely try it.&lt;/P&gt;

&lt;P&gt;So with this question, specifically some fields I want are in events with UID and others are in events with XUID.   Therefore I need to find the key (e.g. sender) that correlates to the other events without XUID.&lt;/P&gt;

&lt;P&gt;Its complicated because the events don't contain all the fields I need.&lt;/P&gt;

&lt;P&gt;I hope that makes sense.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 14:13:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250534#M74841</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-03-18T14:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250535#M74842</link>
      <description>&lt;P&gt;How about using the transaction command on sender?&lt;/P&gt;

&lt;P&gt;yoursearch | transaction mvlist=1 sender | table _time subject sender UID X_UID&lt;/P&gt;

&lt;P&gt;You may want to through a fillnull command in there. You could also add another case/coalesce based field if you need to conditionally include based on UID X_UID.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250535#M74842</guid>
      <dc:creator>snoobzilla</dc:creator>
      <dc:date>2020-09-29T09:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250536#M74843</link>
      <description>&lt;P&gt;Hi Martin,&lt;BR /&gt;&lt;BR /&gt;
Thank you for assisting with this.&lt;BR /&gt;
The email logs I analyze contain multiple events per session, and the fields I want, need to be correlated from all the events related to that email session.  For example the sender is in one event, the subject is in a different event, the recipient is in a different, but they all share a field UID value.   That is the reason for this part of the code.&lt;/P&gt;

&lt;P&gt;[search index=mail sourcetype=xemail subject = "Blah" |stats count by UID| fields UID] &lt;BR /&gt;
     |stats list(subject) as subj list(sender) as sender list(recipient) as recp list(vendor_action) as status by UID &lt;/P&gt;

&lt;P&gt;Now I have other fields values that I need from other separate events that share a field XUID value.   The trick is trying to correlate all events that share UID value and XUID value.  I have not found the right key.   There are events that contain both the UID and XUID fields but I have not figured out how to grab all the fields with from that event.&lt;/P&gt;

&lt;P&gt;I hope that makes sense, if not I will try to mock up some event logs.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 14:54:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250536#M74843</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-03-18T14:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250537#M74844</link>
      <description>&lt;P&gt;Thank you I will give it a try.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 14:55:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250537#M74844</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-03-18T14:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250538#M74845</link>
      <description>&lt;PRE&gt;&lt;CODE&gt; index=mail sourcetype=xemail UID=* OR XUID=* sender=*
 | stats list(recipient) as recipient  list(subject) as subject  list(vendor_action) as status 
         list(dest_ip) as dest_ip list(UID) as UID list(XUID) as XUID by sender
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would avoid the use of the &lt;CODE&gt;transaction&lt;/CODE&gt; command if there is a large number of events.&lt;BR /&gt;
This search is very fast and simple. Use "values" instead of "list" in the stats command if you want remove duplicates from the results. Add "_time" at the end of the stats command if you want to show the time that each event occurred.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 16:29:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250538#M74845</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-03-18T16:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250539#M74846</link>
      <description>&lt;P&gt;For multiple-chained-keys transactions the &lt;CODE&gt;transaction&lt;/CODE&gt; command should be ideal. What happens if you run this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=mail sourcetype=xemail | transaction UID XUID | table _time duration subject sender recipient vendor_action dest
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Mar 2016 21:44:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250539#M74846</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-03-18T21:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250540#M74847</link>
      <description>&lt;P&gt;Thank you, I will give it a try, however there are a large number of events so I will have to [subsearch] first and then use transaction otherwise it will take too long.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2016 17:29:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250540#M74847</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-03-21T17:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250541#M74848</link>
      <description>&lt;P&gt;Use a short time range for testing.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2016 21:19:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250541#M74848</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-03-21T21:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250542#M74849</link>
      <description>&lt;P&gt;Thank you for the advice, using the short time range, however I was aware of that.  The problem is that "transaction " is just too expensive.&lt;/P&gt;

&lt;P&gt;But perhaps I should rephrase my question for you again.&lt;BR /&gt;
So I am working with email logs.  The logs are such that subject, sender, recipient, attachment, etc are all in separate events that share a unique ID (uid).   If I use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[search index=mail sourcetype=xemail subject = "Blah" |stats count by UID| fields UID] 

|stats list(subject) as subj list(sender) as sender list(recipient) as recp list(vendor_action) as status by UID 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I will get some of the fields that I want (e.g. subject, sender, recipient, status, etc.).&lt;/P&gt;

&lt;P&gt;However there are other fields I want that are not associated with UID but rather XUID.  If I use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [search index=mail sourcetype=xemail sender = "Blah" |stats count by XUID| fields XUID] 

    |stats list(dest) as dest_ip list(recipient) as recp by XUID 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I will get some other fields I want (e.g. dest_ip).&lt;/P&gt;

&lt;P&gt;There are events  that contain both UID and XUID, but I don't know how to create a secondary search to pull up all the events containing the XUID found by the primary search of the UID.&lt;/P&gt;

&lt;P&gt;Bottom line I am looking for a way to search a subject and get all the fields associated with the UID, which includes the XUID.  Then use the XUID results to find all fields associated with the XUID number to combine all fields by UID and XUID for that email session.&lt;/P&gt;

&lt;P&gt;If I am going about this the hard way and you have a better solution please let me know.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 16:00:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250542#M74849</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-03-22T16:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250543#M74850</link>
      <description>&lt;P&gt;Re your long comment on the question: That's exactly what &lt;CODE&gt;transaction&lt;/CODE&gt; does, even spanning multiple chained ID fields.&lt;/P&gt;

&lt;P&gt;Here's a working example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count as raw | eval raw = "subject=foo uid=123
subject=foo2 uid=321
sender=bar2 uid=321 xuid=cba
sender=bar uid=123 xuid=abc
recipient=baz xuid=abc
recipient=baz2 xuid=cba" | makemv delim="
" raw | mvexpand raw | rename raw as _raw | extract
| eval _time = time()-(random()%1000) | sort - _time
| transaction uid xuid | table _time duration eventcount subject sender recipient uid xuid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Make sure you keep the line breaks as they are here, that's important for this dirty kind of dummy data generation from within the search bar.&lt;/P&gt;

&lt;P&gt;First I set up six events, three events per email, each event containing only one "email-y" field.&lt;BR /&gt;
The events for subject and sender are tied together with &lt;CODE&gt;uid&lt;/CODE&gt;, the events for sender and recipient are tied together with &lt;CODE&gt;xuid&lt;/CODE&gt;, and the event for sender ties together the &lt;CODE&gt;uid&lt;/CODE&gt; and the &lt;CODE&gt;xuid&lt;/CODE&gt; giving you a nice transitive transaction.&lt;/P&gt;

&lt;P&gt;If you want to search for subject, sender, etc before building the transaction you can either do that manually:&lt;/P&gt;

&lt;P&gt;The good case: You have an event with the field to filter by (say, &lt;CODE&gt;sender)&lt;/CODE&gt; and both ID fields.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=mail sourcetype=xemail
[ search index=mail sourcetype=xemail sender=foo | fields UID XUID | dedup UID XUID | format "(" "(" "OR" ")" "OR" ")" ]
| transaction UID XUID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will search for events matching your sender and use the UID and XUID field to search all potential matches beyond the "sender-event", then build the transaction from there.&lt;/P&gt;

&lt;P&gt;The bad case, #1: You have an event with the field to filter by, but only the UID field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=mail sourcetype=xemail
[ search index=mail sourcetype=xemail 
  [ search index=mail sourcetype=xemail sender=foo | fields UID | dedup UID ]
  | fields UID XUID | dedup UID XUID | format "(" "(" "OR" ")" "OR" ")" ]
| transaction UID XUID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The innermost subsearch will go in, search for your sender, and come back with a list of UIDs. Those are inserted into the outer subsearch, that will go and retrieve all events with that UID - some of those will have the missing XUID! From there it proceeds like the good case above, using UID or XUID to collect together all relevant events and run the transaction.&lt;/P&gt;

&lt;P&gt;The bad case, #2: You have an event with the field to filter by, but only the XUID field.&lt;BR /&gt;
This works like the bad case #1, but you need to add two Xs to the innermost subsearch... so when filtering, you need to know which of the two bad cases to run &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Even though the two bad cases mean you have to go through your index thrice, each run should be a fairly rare search. This will be slower if you search for a sender that sent 90% of all emails, mind.&lt;/P&gt;

&lt;P&gt;Instead of building those subsearch-monsters manually, there is a much-forgotten search command &lt;CODE&gt;searchtxn&lt;/CODE&gt; to do just that for you (I think, don't have data handy to actually test).&lt;BR /&gt;
To use that, you first have to set up a transaction type in transactiontypes.conf like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[xemail]
fields = UID, XUID
search = index=mail sourcetype=xemail
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To confirm that this type works, run a regular non-filtering search with &lt;CODE&gt;| transaction name=xemail&lt;/CODE&gt; and see that it returns the same things as manually specifying the fields. Once that's done, run this with nothing else in the search bar:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| searchtxn xemail sender=foo
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That should collect together all the required IDs and neatly return only matching transactions without scanning everything.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.3/SearchReference/searchtxn"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.3/SearchReference/searchtxn&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;One caveat about &lt;CODE&gt;searchtxn&lt;/CODE&gt;, it's not going to honour your time range picker.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 21:24:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250543#M74850</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-03-22T21:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250544#M74851</link>
      <description>&lt;P&gt;Thank you Martin for enduring my long response and providing the code.  I will try it and let you know.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2016 13:23:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250544#M74851</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-03-23T13:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250545#M74852</link>
      <description>&lt;P&gt;Thank you Martin, I see your strategy, however my objective was to search by one field value, like subject = blah, and automate the subsequent search that would produce the other needed fields.  With your suggestion I would need to lookup the uid and xuid with multiple searches.  I am trying to avoid the tedious/manual multiple searches.&lt;/P&gt;

&lt;P&gt;Do you know how to search for a field value and use the result to automatically launch a subsequent search based on the returned value?   That is where I am stuck.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2016 19:58:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250545#M74852</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-03-23T19:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250546#M74853</link>
      <description>&lt;P&gt;All I think you need to do is to add sender to the list of fields for transaction:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| transaction sender uid xuid | table _time duration eventcount subject sender recipient uid xuid
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Mar 2016 20:05:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250546#M74853</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-03-23T20:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join/combine/correlate fields from separate events with separate UIDs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250547#M74854</link>
      <description>&lt;P&gt;Or perhaps, assume that you have used a form to collect the value of the subject field and have stored in a token named &lt;CODE&gt;$subject$&lt;/CODE&gt;&lt;BR /&gt;
Your search could be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=mail sourcetype=xemail UID=* OR XUID=* sender=* subject="$subject$*"
| transaction sender uid xuid 
| table _time duration eventcount subject sender recipient uid xuid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You could use any field, not just subject. However, the trick to this search is that first you retrieve only the events that have the field of interest. Then use transaction to group them based on the sender and the uids. Note that &lt;CODE&gt;sender&lt;/CODE&gt; is actually the only field that you named as being part of both events with UID and events with XUID. So &lt;CODE&gt;sender&lt;/CODE&gt; needs to be part of the transaction command.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2016 20:14:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-combine-correlate-fields-from/m-p/250547#M74854</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-03-23T20:14:24Z</dc:date>
    </item>
  </channel>
</rss>

