<?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 Compare 2 source types within the same index and find the Gap in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-source-types-within-the-same-index-and-find-the-Gap/m-p/682941#M233271</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank for your quick response, truly appreciate it. But it's not working giving the entire events of source type&amp;nbsp;&lt;SPAN&gt;accountA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Apr 2024 03:25:17 GMT</pubDate>
    <dc:creator>SplunkDash</dc:creator>
    <dc:date>2024-04-03T03:25:17Z</dc:date>
    <item>
      <title>Compare 2 source types within the same index and find the Gap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-source-types-within-the-same-index-and-find-the-Gap/m-p/682905#M233251</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;How do I compare 2 source types within the same index and find the Gap. For Example: index=compare sourcetype=accountA and sourcetype=accountB; we have some account info in accountA but not in&amp;nbsp;accountB and objective is to find that gap.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sourcetypeA&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;accid&amp;nbsp; &amp;nbsp;nameA&amp;nbsp; addressA cellA&lt;/P&gt;&lt;P&gt;002&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;test1&amp;nbsp; &amp;nbsp;tadd1&amp;nbsp; &amp;nbsp; 1234&lt;/P&gt;&lt;P&gt;003&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;test2&amp;nbsp; &amp;nbsp; tadd2&amp;nbsp; &amp;nbsp; 1256&lt;/P&gt;&lt;P&gt;003&amp;nbsp; &amp;nbsp; &amp;nbsp; test2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tadd2&amp;nbsp; &amp;nbsp; 5674&lt;/P&gt;&lt;P&gt;004&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;test3&amp;nbsp; &amp;nbsp; &amp;nbsp;tadd3&amp;nbsp; &amp;nbsp;2345&lt;/P&gt;&lt;P&gt;005&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;test4&amp;nbsp; &amp;nbsp; &amp;nbsp; tadd4&amp;nbsp; 4567&lt;/P&gt;&lt;P&gt;006&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; test5&amp;nbsp; &amp;nbsp; &amp;nbsp; tadd5&amp;nbsp; &amp;nbsp;7800&lt;/P&gt;&lt;P&gt;006&amp;nbsp; &amp;nbsp; test5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tadd5&amp;nbsp; &amp;nbsp;9900&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sourcetypeB&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;accid&amp;nbsp; &amp;nbsp;nameB&amp;nbsp; addressB cellB&lt;/P&gt;&lt;P&gt;002&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;test1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tadd1&amp;nbsp; &amp;nbsp; 1234&lt;/P&gt;&lt;P&gt;003&amp;nbsp; &amp;nbsp; &amp;nbsp; test2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tadd2&amp;nbsp; &amp;nbsp; 5674&lt;/P&gt;&lt;P&gt;004&amp;nbsp; &amp;nbsp; &amp;nbsp;test3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tadd3&amp;nbsp; &amp;nbsp;2345&lt;/P&gt;&lt;P&gt;005&amp;nbsp; &amp;nbsp; &amp;nbsp;test4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tadd3&amp;nbsp; 4567&lt;/P&gt;&lt;P&gt;006&amp;nbsp; &amp;nbsp; test5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tadd5&amp;nbsp; &amp;nbsp;9900&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output will be:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;003&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;test2&amp;nbsp; &amp;nbsp; tadd2&amp;nbsp; &amp;nbsp; 1256&lt;/P&gt;&lt;P&gt;006&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; test5&amp;nbsp; &amp;nbsp; &amp;nbsp; tadd5&amp;nbsp; &amp;nbsp;7800&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any Recommendation will be highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 21:35:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-source-types-within-the-same-index-and-find-the-Gap/m-p/682905#M233251</guid>
      <dc:creator>SplunkDash</dc:creator>
      <dc:date>2024-04-02T21:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 source types within the same index and find the Gap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-source-types-within-the-same-index-and-find-the-Gap/m-p/682907#M233253</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=compare sourcetype="accountA" OR sourcetype="accountB"
| rename nameB as nameA, addressB as addressA, cellB as cellA
| eventstats count by accid nameA addressA cellA
| where count==1&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 02 Apr 2024 22:21:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-source-types-within-the-same-index-and-find-the-Gap/m-p/682907#M233253</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-02T22:21:36Z</dc:date>
    </item>
    <item>
      <title>Compare 2 source types within the same index and find the Gap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-source-types-within-the-same-index-and-find-the-Gap/m-p/682941#M233271</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank for your quick response, truly appreciate it. But it's not working giving the entire events of source type&amp;nbsp;&lt;SPAN&gt;accountA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 03:25:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-source-types-within-the-same-index-and-find-the-Gap/m-p/682941#M233271</guid>
      <dc:creator>SplunkDash</dc:creator>
      <dc:date>2024-04-03T03:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 source types within the same index and find the Gap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-source-types-within-the-same-index-and-find-the-Gap/m-p/682976#M233280</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234909"&gt;@SplunkDash&lt;/a&gt;, Can you please check below -&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="accid,nameA,addressA,cellA
002,test1,tadd1,1234
003,test2,tadd2,1256
003,test2,tadd2,5674
004,test3,tadd3,2345
005,test4,tadd4,4567
006,test5,tadd5,7800
006,test5,tadd5,9900" 
| multikv forceheader=1 
| eval sourcetype="sourcetypeA" 
| append 
    [| makeresults 
    | eval _raw="accid,nameB,addressB,cellB
002,test1,tadd1,1234
003,test2,tadd2,5674
004,test3,tadd3,2345
005,test4,tadd3,4567
006,test5,tadd5,9900" 
    | multikv forceheader=1 
    | eval sourcetype="sourcetypeB"
        ] 
| kv 
| stats values(*) as * by accid 
| where mvcount(nameA) != mvcount(nameB) OR mvcount(addressA) != mvcount(addressB) OR mvcount(cellA) != mvcount(cellB)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if you have any questions for the above.&lt;/P&gt;&lt;P&gt;Please accept the solution and hit Karma, if this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 08:09:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-source-types-within-the-same-index-and-find-the-Gap/m-p/682976#M233280</guid>
      <dc:creator>meetmshah</dc:creator>
      <dc:date>2024-04-03T08:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 source types within the same index and find the Gap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-source-types-within-the-same-index-and-find-the-Gap/m-p/682993#M233282</link>
      <description>&lt;P&gt;Try with coalesce&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval nameA=coalesce(nameA, nameB), addressA=coalesce(addressA, addressB), cellA=coalesce(cellA, cellB)
| eventstats count by accid nameA addressA cellA
| where count==1&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 03 Apr 2024 09:01:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-source-types-within-the-same-index-and-find-the-Gap/m-p/682993#M233282</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-03T09:01:47Z</dc:date>
    </item>
  </channel>
</rss>

