<?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 Re: what is the best way to enrich events from another search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/what-is-the-best-way-to-enrich-events-from-another-search/m-p/447996#M126957</link>
    <description>&lt;P&gt;Something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sourceA OR index=SourceB
| stats min(_time) as start, max(_time) as end, values(action) as action, values(user) by user, values(scr_ip) as src_ip by session
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You could also use something like a  left join, however, join uses the same limits as subsearch and 10K&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=SourceB
| join type=left  session [ index=sourceA | fields user, action ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Would need more specifics&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2019 18:47:26 GMT</pubDate>
    <dc:creator>solarboyz1</dc:creator>
    <dc:date>2019-08-15T18:47:26Z</dc:date>
    <item>
      <title>what is the best way to enrich events from another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/what-is-the-best-way-to-enrich-events-from-another-search/m-p/447994#M126955</link>
      <description>&lt;P&gt;I have two data sources&lt;/P&gt;

&lt;P&gt;Source A&lt;BR /&gt;
time action src_ip session user&lt;BR /&gt;
 - "action" varies between (logon, logoff and relogon)&lt;BR /&gt;
 - "session" contains a randomly generated sessionID that is unique and does not appear to be reused&lt;BR /&gt;
 - "user" is the userid&lt;/P&gt;

&lt;P&gt;Source B&lt;BR /&gt;
time session &lt;/P&gt;

&lt;P&gt;What is the most efficient way of enriching the event data  in Source B with the user that matches the session from source A?&lt;/P&gt;

&lt;P&gt;To give you an idea of the data-set size.&lt;/P&gt;

&lt;P&gt;source="Source A" | stats values(user) as user by session&lt;BR /&gt;
returns 17,000 odd unique tuples from around a million events and the job completes in under a second.&lt;/P&gt;

&lt;P&gt;Source B contains over 100 million events.&lt;/P&gt;

&lt;P&gt;Was thinking of running a regularly scheduled search to maintain a csv of user,session and then setting up a calculated field that performs a lookup (with the expectation that the newest events will not be enriched with a user.&lt;/P&gt;

&lt;P&gt;Suggestions anyone?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 13:51:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/what-is-the-best-way-to-enrich-events-from-another-search/m-p/447994#M126955</guid>
      <dc:creator>pwild_splunk</dc:creator>
      <dc:date>2019-08-15T13:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: what is the best way to enrich events from another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/what-is-the-best-way-to-enrich-events-from-another-search/m-p/447995#M126956</link>
      <description>&lt;P&gt;what is the problem you are trying to solve? how does "Source B" data looks like? what fields or values are a match to source A?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 15:27:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/what-is-the-best-way-to-enrich-events-from-another-search/m-p/447995#M126956</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2019-08-15T15:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: what is the best way to enrich events from another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/what-is-the-best-way-to-enrich-events-from-another-search/m-p/447996#M126957</link>
      <description>&lt;P&gt;Something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sourceA OR index=SourceB
| stats min(_time) as start, max(_time) as end, values(action) as action, values(user) by user, values(scr_ip) as src_ip by session
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You could also use something like a  left join, however, join uses the same limits as subsearch and 10K&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=SourceB
| join type=left  session [ index=sourceA | fields user, action ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Would need more specifics&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 18:47:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/what-is-the-best-way-to-enrich-events-from-another-search/m-p/447996#M126957</guid>
      <dc:creator>solarboyz1</dc:creator>
      <dc:date>2019-08-15T18:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: what is the best way to enrich events from another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/what-is-the-best-way-to-enrich-events-from-another-search/m-p/447997#M126958</link>
      <description>&lt;P&gt;I'm not wanting to build a dashboard, I wish to enrich the event data so that an investigator can search for a user and find the events associated with that user. The events in Source-B do not include a user field within the data, just a session.&lt;BR /&gt;
Source-A will map a session to a user when the user logs on.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 19:01:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/what-is-the-best-way-to-enrich-events-from-another-search/m-p/447997#M126958</guid>
      <dc:creator>pwild_splunk</dc:creator>
      <dc:date>2019-08-15T19:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: what is the best way to enrich events from another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/what-is-the-best-way-to-enrich-events-from-another-search/m-p/447998#M126959</link>
      <description>&lt;P&gt;When we are trying to do something like match an IP that gets recycled with the users/session/mac that obtained it, we take the obtaining/identifying dataset and use a &lt;CODE&gt;Scheduled Search&lt;/CODE&gt; to create/trim/updated a &lt;CODE&gt;time-based lookup&lt;/CODE&gt; and the use that lookup (which can be setup to be an &lt;CODE&gt;Automatic Lookup&lt;/CODE&gt;) to enrich the other dataset:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Defineatime-basedlookupinSplunkWeb"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Defineatime-basedlookupinSplunkWeb&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 23:03:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/what-is-the-best-way-to-enrich-events-from-another-search/m-p/447998#M126959</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-08-15T23:03:16Z</dc:date>
    </item>
  </channel>
</rss>

