<?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: Missing original value after using distinct query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Missing-original-value-after-using-distinct-query/m-p/402382#M190884</link>
    <description>&lt;P&gt;@michaelhoang ,&lt;/P&gt;

&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="aws:cloudwatchlogs:vpcflow"
| stats dc(dest) as Count,values(dest) as dest by src
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    sourcetype="aws:cloudwatchlogs:vpcflow"
    | stats dc(dest) as Count  by src,dest|eventstats sum(Count) as Count by src
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 22 Jul 2019 05:22:13 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2019-07-22T05:22:13Z</dc:date>
    <item>
      <title>Missing original value after using distinct query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Missing-original-value-after-using-distinct-query/m-p/402381#M190883</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I am having the following issue that need your help.&lt;BR /&gt;
The scenario is: I am working on the report of firewall data in Splunk. The requirement is getting the distinct destination connected by source address. The table should contain: Source Address, Destination Address and Distinct count the number of Destination address connected by Source.&lt;BR /&gt;
I am trying to use the dc query to get the distinct count for destination address but when doing table, i only can get source and distinct count number but the destination address value is missing.&lt;BR /&gt;
Here is the query that I am using:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;sourcetype="aws:cloudwatchlogs:vpcflow"&lt;BR /&gt;
| dedup src dest | stats dc(dest) as&lt;BR /&gt;
Count by src | table src dest Count |&lt;BR /&gt;
sort src&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Below is the output of the query:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7383i999AA91A7DDA3D0B/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Please help to suggest what query should I use to retain the destination address value.&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Michael&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 03:23:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Missing-original-value-after-using-distinct-query/m-p/402381#M190883</guid>
      <dc:creator>michaelhoang</dc:creator>
      <dc:date>2019-07-22T03:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Missing original value after using distinct query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Missing-original-value-after-using-distinct-query/m-p/402382#M190884</link>
      <description>&lt;P&gt;@michaelhoang ,&lt;/P&gt;

&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="aws:cloudwatchlogs:vpcflow"
| stats dc(dest) as Count,values(dest) as dest by src
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    sourcetype="aws:cloudwatchlogs:vpcflow"
    | stats dc(dest) as Count  by src,dest|eventstats sum(Count) as Count by src
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jul 2019 05:22:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Missing-original-value-after-using-distinct-query/m-p/402382#M190884</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-07-22T05:22:13Z</dc:date>
    </item>
  </channel>
</rss>

