<?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 Is it possible to do a Splunk query that can give me difference in values? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-do-a-Splunk-query-that-can-give-me-difference/m-p/627853#M107741</link>
    <description>&lt;P&gt;We have ingested into Splunk logs from our application - these logs include two keys - stageType &amp;nbsp;and correlation id, along with other keys. &amp;nbsp; &amp;nbsp;I have to find a list of correlation ids that are returned for one stageType and not for other stageType. &amp;nbsp; I realise Splunk queries cannot be written similar to SQL I am not very conversant with Splunk - &amp;nbsp;I just normally get by - using simpler queries. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hence hoping, someone can help me with a query that gives me the list - so I can do further analysis to find out the reason for differences, which should not normally exist.&lt;/P&gt;
&lt;P&gt;Is it possible to do it in Splunk? Can someone help me with the query?&lt;/P&gt;
&lt;P&gt;index=grp-applications sourcetype="kafka:status" stageType IN ("STAGEA", "STAGEB" ) &amp;nbsp;env=qa | dedup env, correlationId, stageType | stats count by env, correlationId, stageType&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jan 2023 16:00:57 GMT</pubDate>
    <dc:creator>AruBhende</dc:creator>
    <dc:date>2023-01-23T16:00:57Z</dc:date>
    <item>
      <title>Is it possible to do a Splunk query that can give me difference in values?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-do-a-Splunk-query-that-can-give-me-difference/m-p/627853#M107741</link>
      <description>&lt;P&gt;We have ingested into Splunk logs from our application - these logs include two keys - stageType &amp;nbsp;and correlation id, along with other keys. &amp;nbsp; &amp;nbsp;I have to find a list of correlation ids that are returned for one stageType and not for other stageType. &amp;nbsp; I realise Splunk queries cannot be written similar to SQL I am not very conversant with Splunk - &amp;nbsp;I just normally get by - using simpler queries. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hence hoping, someone can help me with a query that gives me the list - so I can do further analysis to find out the reason for differences, which should not normally exist.&lt;/P&gt;
&lt;P&gt;Is it possible to do it in Splunk? Can someone help me with the query?&lt;/P&gt;
&lt;P&gt;index=grp-applications sourcetype="kafka:status" stageType IN ("STAGEA", "STAGEB" ) &amp;nbsp;env=qa | dedup env, correlationId, stageType | stats count by env, correlationId, stageType&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 16:00:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-do-a-Splunk-query-that-can-give-me-difference/m-p/627853#M107741</guid>
      <dc:creator>AruBhende</dc:creator>
      <dc:date>2023-01-23T16:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to do a Splunk query that can give me difference in values</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-do-a-Splunk-query-that-can-give-me-difference/m-p/627854#M107742</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232701"&gt;@AruBhende&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Please try below;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=grp-applications sourcetype="kafka:status" stageType IN ("STAGEA", "STAGEB" ) env=qa 
| stats values(stageType) as stageType by env correlationId 
| where mvcount(stageType) = 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2023 02:08:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-do-a-Splunk-query-that-can-give-me-difference/m-p/627854#M107742</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2023-01-21T02:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to do a Splunk query that can give me difference in values</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-do-a-Splunk-query-that-can-give-me-difference/m-p/627855#M107743</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried it but it is not giving the difference, it is giving all the correlation ids. &amp;nbsp;For STAGEA, there are about 55000 events returned and for STAGEB, about 50000. &amp;nbsp;The above query is returning 105,000 events, whereas I want to get only the 5000 - which is the difference. &amp;nbsp;Is it possible ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2023 02:21:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-do-a-Splunk-query-that-can-give-me-difference/m-p/627855#M107743</guid>
      <dc:creator>AruBhende</dc:creator>
      <dc:date>2023-01-21T02:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to do a Splunk query that can give me difference in values</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-do-a-Splunk-query-that-can-give-me-difference/m-p/627858#M107744</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232701"&gt;@AruBhende&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;If you see all correlation ids, they should be different between stages. Can you paste a sample log containing both stages?&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2023 02:36:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-do-a-Splunk-query-that-can-give-me-difference/m-p/627858#M107744</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2023-01-21T02:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to do a Splunk query that can give me difference in values</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-do-a-Splunk-query-that-can-give-me-difference/m-p/627860#M107745</link>
      <description>&lt;P&gt;Sorry, it was a mistake on my part. &amp;nbsp;It should have been sourceCorrelationId instead of correlationId. &amp;nbsp;Both are valid keys in the log. When I used&amp;nbsp;sourceCorrs a am accepting that elationId in the example you provided, it worked.&lt;/P&gt;&lt;P&gt;I am accepting that as solution.&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2023 03:05:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-do-a-Splunk-query-that-can-give-me-difference/m-p/627860#M107745</guid>
      <dc:creator>AruBhende</dc:creator>
      <dc:date>2023-01-21T03:05:19Z</dc:date>
    </item>
  </channel>
</rss>

