<?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 How to evaluate data match from 2 sources in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-data-match-from-2-sources/m-p/709595#M239814</link>
    <description>&lt;P&gt;I have a search that searches 2 different indexes. We expect that there is 1 record from each index for a single id. The search is pretty simple:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=index1 
| rename Number__c as EventId
| append [search index=index2 sourcetype="api" ]
| stats count by EventId
| search count &amp;lt; 2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i would like to do now is evaluate that there is a single record from each index for each&amp;nbsp;EventId, to ensure that the count of 2 isn't 2 records in a single index. There are times where, in index2, a single EventId has more than one record which makes the count inaccurate because it's not evaluating whether there was a record for it in index1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jan 2025 14:24:51 GMT</pubDate>
    <dc:creator>tkwaller1</dc:creator>
    <dc:date>2025-01-23T14:24:51Z</dc:date>
    <item>
      <title>How to evaluate data match from 2 sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-data-match-from-2-sources/m-p/709595#M239814</link>
      <description>&lt;P&gt;I have a search that searches 2 different indexes. We expect that there is 1 record from each index for a single id. The search is pretty simple:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=index1 
| rename Number__c as EventId
| append [search index=index2 sourcetype="api" ]
| stats count by EventId
| search count &amp;lt; 2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i would like to do now is evaluate that there is a single record from each index for each&amp;nbsp;EventId, to ensure that the count of 2 isn't 2 records in a single index. There are times where, in index2, a single EventId has more than one record which makes the count inaccurate because it's not evaluating whether there was a record for it in index1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2025 14:24:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-data-match-from-2-sources/m-p/709595#M239814</guid>
      <dc:creator>tkwaller1</dc:creator>
      <dc:date>2025-01-23T14:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to evaluate data match from 2 sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-data-match-from-2-sources/m-p/709600#M239817</link>
      <description>&lt;P&gt;Try counting the number of indexes for each EventId.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=index1 
| rename Number__c as EventId
| append [search index=index2 sourcetype="api" ]
| stats count, dc(index) as indexCount by EventId
| search count &amp;lt; 2 OR indexCount=1&lt;/LI-CODE&gt;&lt;P&gt;Also, the &lt;FONT face="courier new,courier"&gt;append&lt;/FONT&gt; command is inefficient and not necessary in this case.&amp;nbsp; Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=index1 OR (index=index2 sourcetype="api")
| rename Number__c as EventId
| stats count, dc(index) as indexCount by EventId
| search count &amp;lt; 2 OR indexCount=1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2025 14:44:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-data-match-from-2-sources/m-p/709600#M239817</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2025-01-23T14:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to evaluate data match from 2 sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-data-match-from-2-sources/m-p/710626#M240010</link>
      <description>&lt;P&gt;This worked well.&lt;BR /&gt;Last question:&lt;BR /&gt;If i wanted to ensure the single record that i find only comes from search 1 and not from search 2. how would i do that.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks again&lt;/P&gt;&lt;P&gt;Todd&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 19:46:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-data-match-from-2-sources/m-p/710626#M240010</guid>
      <dc:creator>tkwaller_2</dc:creator>
      <dc:date>2025-02-04T19:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to evaluate data match from 2 sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-data-match-from-2-sources/m-p/710628#M240011</link>
      <description>&lt;P&gt;This worked well.&lt;BR /&gt;Last question:&lt;BR /&gt;If i wanted to ensure the single record that i find only comes from search 1 and not from search 2. how would i do that.&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Todd&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 20:06:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-data-match-from-2-sources/m-p/710628#M240011</guid>
      <dc:creator>tkwaller_2</dc:creator>
      <dc:date>2025-02-04T20:06:04Z</dc:date>
    </item>
  </channel>
</rss>

