<?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: Compare One Field over Two Times in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Compare-One-Field-over-Two-Times/m-p/118282#M31570</link>
    <description>&lt;P&gt;I don't understand your question so do go back around and spell it out more clearly.  Sample data would help.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jul 2015 19:25:27 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-07-13T19:25:27Z</dc:date>
    <item>
      <title>Compare One Field over Two Times</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-One-Field-over-Two-Times/m-p/118281#M31569</link>
      <description>&lt;P&gt;I want to see what is new for the past two weeks, that hasn't been seen in the past. The only part of the search that would change is the time frame.&lt;/P&gt;

&lt;P&gt;earlist=-4w latest=-2w index=int sourcetype=threat | stats count by name | sort -count| head 10&lt;BR /&gt;
Gives me a table of top ten names between two and four weeks ago.&lt;BR /&gt;
The name field updates on a weekly basis, sometimes more often. Nothing from the name field would be deleted.&lt;/P&gt;

&lt;P&gt;I'm looking to compare the top 10 results and a complete list of what is new in the past two weeks.&lt;/P&gt;

&lt;P&gt;I have searched through other answers, but not having any luck getting a working search.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 17:27:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-One-Field-over-Two-Times/m-p/118281#M31569</guid>
      <dc:creator>craigmueller</dc:creator>
      <dc:date>2015-07-13T17:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Compare One Field over Two Times</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-One-Field-over-Two-Times/m-p/118282#M31570</link>
      <description>&lt;P&gt;I don't understand your question so do go back around and spell it out more clearly.  Sample data would help.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 19:25:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-One-Field-over-Two-Times/m-p/118282#M31570</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-13T19:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Compare One Field over Two Times</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-One-Field-over-Two-Times/m-p/118283#M31571</link>
      <description>&lt;P&gt;Let's say I run this search, earliest=-4w latest=-2w index=int sourcetype=threat | stats count by name | sort -count | head 10&lt;BR /&gt;
Results are -&lt;BR /&gt;
Endpoint    6434272&lt;BR /&gt;
URL         2499463&lt;BR /&gt;
RPC         2428255&lt;BR /&gt;
HTTP        299502&lt;BR /&gt;
Login       180736&lt;BR /&gt;
enumeration 170613&lt;BR /&gt;
SMB         167128&lt;BR /&gt;
NetBIOS     165573&lt;BR /&gt;
user        92934&lt;BR /&gt;
Buffer      54541&lt;/P&gt;

&lt;P&gt;I run the same search, just with the earlier time frame, earliest=-2w latest=-d index=int sourcetype=threat | stats count by name | sort -count | head 10&lt;BR /&gt;
Results are - &lt;BR /&gt;
Endpoint    7449314&lt;BR /&gt;
SMB         2699952&lt;BR /&gt;
URL         2489496&lt;BR /&gt;
enumeration 503045&lt;BR /&gt;
Options     332335&lt;BR /&gt;
MP4         295500&lt;BR /&gt;
Adobe       243639&lt;BR /&gt;
NetBIOS     178598&lt;BR /&gt;
Microsoft   139980&lt;BR /&gt;
SIP         39992&lt;/P&gt;

&lt;P&gt;You can see there is some overlap between the two searches and that is was I am wanting to omit. I am only wanting to see what is new when comparing the past two weeks vs an older time frame.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 19:54:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-One-Field-over-Two-Times/m-p/118283#M31571</guid>
      <dc:creator>craigmueller</dc:creator>
      <dc:date>2015-07-13T19:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Compare One Field over Two Times</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-One-Field-over-Two-Times/m-p/118284#M31572</link>
      <description>&lt;P&gt;This might work:&lt;/P&gt;

&lt;P&gt;earliest=-2w latest=-d index=int sourcetype=threat NOT [search earliest=-4w latest=-2w index=int sourcetype=threat | stats count by name | sort -count | head 10 | table name ] | stats count by name | sort -count | head 10 | table name&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 20:08:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-One-Field-over-Two-Times/m-p/118284#M31572</guid>
      <dc:creator>sk314</dc:creator>
      <dc:date>2015-07-13T20:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Compare One Field over Two Times</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-One-Field-over-Two-Times/m-p/118285#M31573</link>
      <description>&lt;P&gt;Based on your clarification, maybe like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earlist=-4w latest=-2w index=int sourcetype=threat | stats count by name | sort -count| head 10 | eval type=older | append [earlist=-2w latest=-d index=int sourcetype=threat | stats count by name | sort -count| head 10 | eval type=newer] | eventstats dc(type) as numTypes by name | where numTypes=1 and type="newer"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Jul 2015 23:29:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-One-Field-over-Two-Times/m-p/118285#M31573</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-13T23:29:04Z</dc:date>
    </item>
  </channel>
</rss>

