<?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: How to find count of occurrences of each IP for the first 15 mins starting from the first occurrence of each IP ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-count-of-occurrences-of-each-IP-for-the-first-15/m-p/465248#M191669</link>
    <description>&lt;P&gt;Thanks for the prompt reply . It works . Thanks again. Got to learn a new command.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Feb 2020 05:09:34 GMT</pubDate>
    <dc:creator>sambit_kabi</dc:creator>
    <dc:date>2020-02-13T05:09:34Z</dc:date>
    <item>
      <title>How to find count of occurrences of each IP for the first 15 mins starting from the first occurrence of each IP ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-count-of-occurrences-of-each-IP-for-the-first-15/m-p/465246#M191667</link>
      <description>&lt;P&gt;Say I have an index A which has all the IPs logged during the day. So every event has an IP and the timestamp it was seen.&lt;/P&gt;

&lt;P&gt;What I need to find is the count of the occurrence of each IP for the first 15 mins starting from the timestamp of the first occurrence of the IP.&lt;/P&gt;

&lt;P&gt;Example: Say I find IP 1.2.3.4 at 10:00, 10:05,10:12, 10:16,10:20 and IP 9.8.7.6 at 11:00, 11:05, 11:10, 11:20.&lt;/P&gt;

&lt;P&gt;For IP 1.2.3.4 the first occurrence was at 10:00 . So in the first 15 mins which is from 10:00 till 10:15 I get the occurrence count as 3. Occurrence at 10:16 and 10:20 is ignored.&lt;/P&gt;

&lt;P&gt;Similarly for IP 9.8.7.6 the first occurrence was at 11:00 , so the first 15 mins i.e from 11:00 to 11:15 the occurrence count is 3. 11:20 occurrence is ignored.&lt;/P&gt;

&lt;P&gt;So basically I want a search query which will give me the count of occurrence of each IP for the first 15 mins starting from the first occurrence of each IP.&lt;/P&gt;

&lt;P&gt;The search result here would be &lt;BR /&gt;
1.2.3.4      3&lt;BR /&gt;
9.8.7.6      3&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 17:58:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-count-of-occurrences-of-each-IP-for-the-first-15/m-p/465246#M191667</guid>
      <dc:creator>sambit_kabi</dc:creator>
      <dc:date>2020-02-11T17:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to find count of occurrences of each IP for the first 15 mins starting from the first occurrence of each IP ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-count-of-occurrences-of-each-IP-for-the-first-15/m-p/465247#M191668</link>
      <description>&lt;P&gt;Here is a couple of ways:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt;|bin span=15m _time
|stats count by IPaddress,_time
| sort + _time
| dedup IPaddress
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will use arbitrary 15 min blocks, 00,15,30,45 etc.&lt;/P&gt;

&lt;P&gt;If you want the 15 mins to start from the time of the first event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt;|transaction IPAddress maxspan=900
| sort + _time
| dedup IPAddress
| table IPAddress _time eventcount
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Feb 2020 18:15:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-count-of-occurrences-of-each-IP-for-the-first-15/m-p/465247#M191668</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-02-11T18:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to find count of occurrences of each IP for the first 15 mins starting from the first occurrence of each IP ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-count-of-occurrences-of-each-IP-for-the-first-15/m-p/465248#M191669</link>
      <description>&lt;P&gt;Thanks for the prompt reply . It works . Thanks again. Got to learn a new command.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 05:09:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-count-of-occurrences-of-each-IP-for-the-first-15/m-p/465248#M191669</guid>
      <dc:creator>sambit_kabi</dc:creator>
      <dc:date>2020-02-13T05:09:34Z</dc:date>
    </item>
  </channel>
</rss>

