<?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 Distinct count when grouped events meet certain criteria in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Distinct-count-when-grouped-events-meet-certain-criteria/m-p/25083#M177535</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I can't for the life of me figure out how to do the following.&lt;/P&gt;

&lt;P&gt;I'm analysing some standard web logs.&lt;/P&gt;

&lt;P&gt;I want to be able to find out when any unique IP address accesses a particular URI path more than once a second.&lt;/P&gt;

&lt;P&gt;The starting point I have for this is as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;uri_path=/foo | span=1s timechart dc(clientip)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This shows me when the distinct count of IP addresses accessing this URL per 1 second intervals BUT it includes all instances where the requests are made just once during this span. I only want a distinct count of the IP addresses that requested the URL more than once in the 1 second span.&lt;/P&gt;

&lt;P&gt;Does anyone have any idea how to do this?&lt;/P&gt;

&lt;P&gt;Many thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Aug 2012 12:16:24 GMT</pubDate>
    <dc:creator>monkey</dc:creator>
    <dc:date>2012-08-03T12:16:24Z</dc:date>
    <item>
      <title>Distinct count when grouped events meet certain criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Distinct-count-when-grouped-events-meet-certain-criteria/m-p/25083#M177535</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I can't for the life of me figure out how to do the following.&lt;/P&gt;

&lt;P&gt;I'm analysing some standard web logs.&lt;/P&gt;

&lt;P&gt;I want to be able to find out when any unique IP address accesses a particular URI path more than once a second.&lt;/P&gt;

&lt;P&gt;The starting point I have for this is as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;uri_path=/foo | span=1s timechart dc(clientip)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This shows me when the distinct count of IP addresses accessing this URL per 1 second intervals BUT it includes all instances where the requests are made just once during this span. I only want a distinct count of the IP addresses that requested the URL more than once in the 1 second span.&lt;/P&gt;

&lt;P&gt;Does anyone have any idea how to do this?&lt;/P&gt;

&lt;P&gt;Many thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2012 12:16:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Distinct-count-when-grouped-events-meet-certain-criteria/m-p/25083#M177535</guid>
      <dc:creator>monkey</dc:creator>
      <dc:date>2012-08-03T12:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count when grouped events meet certain criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Distinct-count-when-grouped-events-meet-certain-criteria/m-p/25084#M177536</link>
      <description>&lt;P&gt;Add a filter condition after :&lt;/P&gt;

&lt;PRE&gt;
uri_path=/foo | span=1s timechart dc(clientip) AS distinct_ip | where distinct_ip &amp;gt;1
&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Aug 2012 15:33:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Distinct-count-when-grouped-events-meet-certain-criteria/m-p/25084#M177536</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2012-08-03T15:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count when grouped events meet certain criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Distinct-count-when-grouped-events-meet-certain-criteria/m-p/25085#M177537</link>
      <description>&lt;P&gt;Thanks, yannK, but that doesn't quite achieve what I want: it charts data when more than one distinct client IP appears in one second. I only want to chart the count of distinct client IPs where the count of each distinct client IP is more than one.&lt;/P&gt;

&lt;P&gt;192.168.1.1&lt;BR /&gt;
192.168.1.1&lt;BR /&gt;
192.168.2.2&lt;/P&gt;

&lt;P&gt;I.e. if the above client IPs appear in one second, I want to chart "1" for that second (since 192.168.1.1 appears twice).&lt;/P&gt;

&lt;P&gt;192.168.1.1&lt;BR /&gt;
192.168.2.2&lt;BR /&gt;
192.168.3.3&lt;/P&gt;

&lt;P&gt;If the above appear in one second, I want to chart "0" for that second.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Aug 2012 08:23:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Distinct-count-when-grouped-events-meet-certain-criteria/m-p/25085#M177537</guid>
      <dc:creator>monkey</dc:creator>
      <dc:date>2012-08-04T08:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count when grouped events meet certain criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Distinct-count-when-grouped-events-meet-certain-criteria/m-p/25086#M177538</link>
      <description>&lt;P&gt;ok so you want how many time EACH distinct ip connects in a 1 second windows. exclude all the ones that connected only one, &lt;BR /&gt;
then count the number of those distinct ips per second.&lt;/P&gt;

&lt;PRE&gt;
uri_path=/foo 
| bucket _time span=1s 
| stats count by _time clientip 
| where count &amp;gt;1 
| timechart span=1s dc(clientip) as distinct_ip
&lt;/PRE&gt;</description>
      <pubDate>Sun, 05 Aug 2012 05:06:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Distinct-count-when-grouped-events-meet-certain-criteria/m-p/25086#M177538</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2012-08-05T05:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count when grouped events meet certain criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Distinct-count-when-grouped-events-meet-certain-criteria/m-p/25087#M177539</link>
      <description>&lt;P&gt;did it worked for you ?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Sep 2012 07:09:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Distinct-count-when-grouped-events-meet-certain-criteria/m-p/25087#M177539</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2012-09-03T07:09:22Z</dc:date>
    </item>
  </channel>
</rss>

