<?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: Calculate how many IPs changed since last week in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculate-how-many-IPs-changed-since-last-week/m-p/93641#M24123</link>
    <description>&lt;P&gt;You need to do a subsearch and use the boolean NOT to exclude those results.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=mylogs src_ip=* NOT [ search earliest=-14d@d latest=-7d@d  source=mylogs | stats count by src_ip | fields src_ip ] | stats dc(src_ip) as "New IP's this week"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you are regularly doing this and have a lot of data, you might want to schedule the subsearch to speed this up.&lt;/P&gt;

&lt;P&gt;edited to add the command "search" above and modify output&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jul 2013 13:17:20 GMT</pubDate>
    <dc:creator>bmunson_splunk</dc:creator>
    <dc:date>2013-07-12T13:17:20Z</dc:date>
    <item>
      <title>Calculate how many IPs changed since last week</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-how-many-IPs-changed-since-last-week/m-p/93639#M24121</link>
      <description>&lt;P&gt;I have a bunch of log files from a honeypot. In this logfiles, I have IP-Adresses which appear almost every day and some of them change. Now I'd like to see on a per week basis how many new IPs dropping in the pot. &lt;/P&gt;

&lt;P&gt;Just to make my analysis problem clear&lt;/P&gt;

&lt;P&gt;IPs in week 1&lt;BR /&gt;&lt;BR /&gt;
1.2.3.4&lt;BR /&gt;&lt;BR /&gt;
2.3.4.5&lt;BR /&gt;&lt;BR /&gt;
3.4.5.6  &lt;/P&gt;

&lt;P&gt;IPs in week 2&lt;BR /&gt;&lt;BR /&gt;
1.2.3.4&lt;BR /&gt;&lt;BR /&gt;
2.3.4.5&lt;BR /&gt;&lt;BR /&gt;
3.4.5.6&lt;BR /&gt;&lt;BR /&gt;
9.9.9.9  &lt;/P&gt;

&lt;P&gt;The result would be "1 IP added since last week"&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2013 12:49:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-how-many-IPs-changed-since-last-week/m-p/93639#M24121</guid>
      <dc:creator>Regengott</dc:creator>
      <dc:date>2013-07-12T12:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate how many IPs changed since last week</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-how-many-IPs-changed-since-last-week/m-p/93640#M24122</link>
      <description>&lt;P&gt;use join to see the difference&lt;/P&gt;

&lt;P&gt;Index=blah earliest=-1w@W|stats count as LastCount|join host[Index=blah earliest=-0w@W|stats count as Latest]|table host,LastCount,Latest|eval Difference=Latest-LastCount&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2013 12:59:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-how-many-IPs-changed-since-last-week/m-p/93640#M24122</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-07-12T12:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate how many IPs changed since last week</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-how-many-IPs-changed-since-last-week/m-p/93641#M24123</link>
      <description>&lt;P&gt;You need to do a subsearch and use the boolean NOT to exclude those results.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=mylogs src_ip=* NOT [ search earliest=-14d@d latest=-7d@d  source=mylogs | stats count by src_ip | fields src_ip ] | stats dc(src_ip) as "New IP's this week"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you are regularly doing this and have a lot of data, you might want to schedule the subsearch to speed this up.&lt;/P&gt;

&lt;P&gt;edited to add the command "search" above and modify output&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2013 13:17:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-how-many-IPs-changed-since-last-week/m-p/93641#M24123</guid>
      <dc:creator>bmunson_splunk</dc:creator>
      <dc:date>2013-07-12T13:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate how many IPs changed since last week</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-how-many-IPs-changed-since-last-week/m-p/93642#M24124</link>
      <description>&lt;P&gt;Thx for quick response, but unfortunately I got an error "Unknown search command 'earliest'". Perhaps I should have mentioned I used the free version 5.0.3?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2013 13:25:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-how-many-IPs-changed-since-last-week/m-p/93642#M24124</guid>
      <dc:creator>Regengott</dc:creator>
      <dc:date>2013-07-12T13:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate how many IPs changed since last week</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-how-many-IPs-changed-since-last-week/m-p/93643#M24125</link>
      <description>&lt;P&gt;he just forgot to put the search command.  Add the word search before earliest.  ie: &lt;BR /&gt;
source=mylogs src_ip=* NOT [ search earliest=-14d@d latest=-7d@d  .....&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2013 13:39:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-how-many-IPs-changed-since-last-week/m-p/93643#M24125</guid>
      <dc:creator>okrabbe_splunk</dc:creator>
      <dc:date>2013-07-12T13:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate how many IPs changed since last week</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-how-many-IPs-changed-since-last-week/m-p/93644#M24126</link>
      <description>&lt;P&gt;/me = newbie &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;   Thx - now I got a result, I need to interpret it, wether it is what I want&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2013 14:17:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-how-many-IPs-changed-since-last-week/m-p/93644#M24126</guid>
      <dc:creator>Regengott</dc:creator>
      <dc:date>2013-07-12T14:17:40Z</dc:date>
    </item>
  </channel>
</rss>

