<?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: splunk match between different sourcetypes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/splunk-match-between-different-sourcetypes/m-p/691338#M235420</link>
    <description>&lt;P&gt;Have you tried the search I suggested? &amp;nbsp;That does exactly what you are saying here, and doesn't use lookup. (I understand field_A, field_B, etc., are standins for real field names.)&lt;/P&gt;</description>
    <pubDate>Sat, 22 Jun 2024 04:33:54 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2024-06-22T04:33:54Z</dc:date>
    <item>
      <title>splunk match between different sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-match-between-different-sourcetypes/m-p/691310#M235410</link>
      <description>&lt;P&gt;I'm trying to create a search where I take a small list of IPs from sourcetype A and compare them against a larger set of IPs in sourcetype B.&amp;nbsp; I will then make a table using fields from sourcetype B that do not exist in sourcetype A to create a more detailed look of the events involving the IP.&lt;/P&gt;
&lt;P&gt;Is there a way to do this without using a lookup table?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=paloalto (sourcetype=sourcetype_B OR sourcetype=sourcetype_A) 
| eval small_tmp=case(log_type="CORRELATION", src_ip)
| eval  large_tmp=case(log_type!="CORRELATION", src_ip)
| where match(small_tmp, large_tmp) 
| table field A, field B, field C&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 15:37:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-match-between-different-sourcetypes/m-p/691310#M235410</guid>
      <dc:creator>kirkj</dc:creator>
      <dc:date>2024-06-21T15:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: splunk match between different sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-match-between-different-sourcetypes/m-p/691321#M235412</link>
      <description>&lt;P&gt;Yes, such use cases are quite common, simple, and it is not always appropriate to use lookup table. &amp;nbsp;In fact, correlation search is the most fundamental strength of Splunk. &amp;nbsp;Meanwhile, you do want to consider whether it is appropriate to compare the two sourcetypes in the same time search period.&lt;/P&gt;&lt;P&gt;This said, your final table is not very illustrative for the statement "make&amp;nbsp;&lt;SPAN&gt;a table using fields from sourcetype B that do not exist in sourcetype A" because IP is nowhere in that table. &amp;nbsp;&lt;STRONG&gt;Mind-reading 1&lt;/STRONG&gt;: I will insert src_ip into the table. &amp;nbsp;More critically, you did not illustrate what you mean exactly by "compare (IPs from sourcetype A) against a larger set of IPs". &amp;nbsp;In the end result, do you want to list IPs in sourcetype B that do not exist in sourcetype A? &amp;nbsp;&lt;STRONG&gt;Mind-reading 2&lt;/STRONG&gt;: I will assume no on this.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=paloalto (sourcetype=sourcetype_B OR sourcetype=sourcetype_A) 
| stats values(field_A) as field_A values(field_B) as field_B values(field_C) as field_C values(sourcetype) as sourcetype by src_ip
| where sourcetype == sourcetype_A
| fields - sourcetype&lt;/LI-CODE&gt;&lt;P&gt;Here, the filter uses a side effect of Splunk's equality comparator on multivalue fields. (There are more semantically expressive alternatives but most people just use this shortcut.)&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 18:10:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-match-between-different-sourcetypes/m-p/691321#M235412</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-06-21T18:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: splunk match between different sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-match-between-different-sourcetypes/m-p/691327#M235417</link>
      <description>&lt;P&gt;Okay let me back up.&amp;nbsp; One sourcetype contains the correlation logs with src_ip as it's primary identifier.&amp;nbsp; the other sourcetype is our threat logs where we see far more data about destination, url, app, etc.&amp;nbsp; I want to create a search that takes the IPs from the correlation logs and looks for the same src_ip in the threat logs within a range of 1-2 hours and returns a detailed table describing what could have caused the correlation event to be created.&lt;/P&gt;&lt;P&gt;Is this possible to do without using an outputlookup?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also this index has a datamodel that I could leverage where nodenames are log.threat and log.correlation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 18:36:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-match-between-different-sourcetypes/m-p/691327#M235417</guid>
      <dc:creator>kirkj</dc:creator>
      <dc:date>2024-06-21T18:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: splunk match between different sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-match-between-different-sourcetypes/m-p/691338#M235420</link>
      <description>&lt;P&gt;Have you tried the search I suggested? &amp;nbsp;That does exactly what you are saying here, and doesn't use lookup. (I understand field_A, field_B, etc., are standins for real field names.)&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jun 2024 04:33:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-match-between-different-sourcetypes/m-p/691338#M235420</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-06-22T04:33:54Z</dc:date>
    </item>
  </channel>
</rss>

