<?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: How do I compare results from 2 indexes on a common field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-results-from-2-indexes-on-a-common-field/m-p/419434#M167209</link>
    <description>&lt;P&gt;Stop using &lt;CODE&gt;join&lt;/CODE&gt;; try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ironport OR (index=crowdstrike* type=url earliest=0)
| spath output=myfield path=relations.indicator{}.type{}
| table indicator, type, ip_address_types, labels_name,malware_families)
| eval indicator = coalesce(indicator, url)
| stats dc(index) AS indexCount BY indicator
| search indexCount&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 08 Oct 2018 22:18:50 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2018-10-08T22:18:50Z</dc:date>
    <item>
      <title>How do I compare results from 2 indexes on a common field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-results-from-2-indexes-on-a-common-field/m-p/419432#M167207</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;Has anyone ever written a search that can compare events(in this case "indicator" across 2 indexes and show them in separate tables side by side? EG search(that doesn't work):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ironport
| rename url AS indicator
| join indicator [search index=crowdstrike* type=url earliest=0 | spath output=myfield path=relations.indicator{}.type{} | table indicator, type, ip_address_types, labels_name,malware_families]
| table indicator
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm basically looking for common "indicator" fields between two indexes, which would then be presented in a table. &lt;BR /&gt;
Any thoughts on this?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 09:29:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-results-from-2-indexes-on-a-common-field/m-p/419432#M167207</guid>
      <dc:creator>mwdbhyat</dc:creator>
      <dc:date>2018-10-08T09:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare results from 2 indexes on a common field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-results-from-2-indexes-on-a-common-field/m-p/419433#M167208</link>
      <description>&lt;P&gt;You can try some this like this &lt;/P&gt;

&lt;P&gt;index=ironport&lt;BR /&gt;
| rename url AS indicator |appendcols [search index=crowdstrike* type=url earliest=0 | spath output=myfield path=relations.indicator{}.type{} | table indicator, type, ip_address_types, labels_name,malware_families]| stats values(*) as * by indicator&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:31:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-results-from-2-indexes-on-a-common-field/m-p/419433#M167208</guid>
      <dc:creator>ssadanala1</dc:creator>
      <dc:date>2020-09-29T21:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare results from 2 indexes on a common field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-results-from-2-indexes-on-a-common-field/m-p/419434#M167209</link>
      <description>&lt;P&gt;Stop using &lt;CODE&gt;join&lt;/CODE&gt;; try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ironport OR (index=crowdstrike* type=url earliest=0)
| spath output=myfield path=relations.indicator{}.type{}
| table indicator, type, ip_address_types, labels_name,malware_families)
| eval indicator = coalesce(indicator, url)
| stats dc(index) AS indexCount BY indicator
| search indexCount&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Oct 2018 22:18:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-results-from-2-indexes-on-a-common-field/m-p/419434#M167209</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-10-08T22:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare results from 2 indexes on a common field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-results-from-2-indexes-on-a-common-field/m-p/419435#M167210</link>
      <description>&lt;P&gt;Thanks that did what I wanted&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 06:00:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-results-from-2-indexes-on-a-common-field/m-p/419435#M167210</guid>
      <dc:creator>mwdbhyat</dc:creator>
      <dc:date>2018-10-09T06:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare results from 2 indexes on a common field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-results-from-2-indexes-on-a-common-field/m-p/419436#M167211</link>
      <description>&lt;P&gt;It will probably be more efficient if you drop the &lt;CODE&gt;| table&lt;/CODE&gt; line or switch to &lt;CODE&gt;| fields&lt;/CODE&gt;.  Try that and compare.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 15:01:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-results-from-2-indexes-on-a-common-field/m-p/419436#M167211</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-10-09T15:01:52Z</dc:date>
    </item>
  </channel>
</rss>

