<?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 differences of a field's values between time ranges? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-differences-of-a-field-s-values-between-time-ranges/m-p/178223#M51266</link>
    <description>&lt;P&gt;Hey thanks for the really quick answer. I learned more about different commands with that but unfortunately it still shows results from the previous time period. I just assumed Splunk could do this easily so how - there's ALWAYS a way to do it with Splunk but this may just be easier for me to knock it out in Excel.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Aug 2014 02:51:30 GMT</pubDate>
    <dc:creator>davespatz</dc:creator>
    <dc:date>2014-08-14T02:51:30Z</dc:date>
    <item>
      <title>How to find differences of a field's values between time ranges?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-differences-of-a-field-s-values-between-time-ranges/m-p/178221#M51264</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Long story on why but I need to run a report on some squid logs based on the host name of the URL visited by the client through the squid proxy (field is url_host). I need to see any new url_host entries since a certain time period to see what changed since my last report - essentially, get me a list of new url_host's I didn't see the last time or time before that, etc. My search is below but it doesn't seem to negate the url_host field values of the inner search. The inner search is what I want to negate and anything new, give me stats on the url_host by count.&lt;/P&gt;

&lt;P&gt;Tried two different ways - first way below returns items that are still in the inner search:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;sourcetype=squid earliest="7/17/2014:00:00:00" latest=now NOT [ search sourcetype=squid earliest="6/18/2014:00:00:00" latest="7/16/2014:23:59:59" | fields url_host ] | fields url_host | stats count by url_host&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Second way also appears to give me results that I know are in both searches:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;| set diff [search sourcetype=squid earliest="7/17/2014:00:00:00" latest=now | fields url_host] [search sourcetype=squid earliest="6/18/2014:00:00:00" latest="7/16/2014:23:59:59" | fields url_host] | stats count by url_host&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Thanks in advance to anyone who answers.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:18:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-differences-of-a-field-s-values-between-time-ranges/m-p/178221#M51264</guid>
      <dc:creator>davespatz</dc:creator>
      <dc:date>2020-09-28T17:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to find differences of a field's values between time ranges?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-differences-of-a-field-s-values-between-time-ranges/m-p/178222#M51265</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=squid earliest="7/17/2014:00:00:00" latest=now 
| stats count by url_host | eval Period="current"
| append [ search sourcetype=squid earliest="6/18/2014:00:00:00" latest="7/16/2014:23:59:59"  | stats count by url_host | eval Period="past" ]
| stats values(Period) as Periods by url_host | where mvcount(Periods)=1 AND Periods="current"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Aug 2014 17:31:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-differences-of-a-field-s-values-between-time-ranges/m-p/178222#M51265</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-11T17:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to find differences of a field's values between time ranges?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-differences-of-a-field-s-values-between-time-ranges/m-p/178223#M51266</link>
      <description>&lt;P&gt;Hey thanks for the really quick answer. I learned more about different commands with that but unfortunately it still shows results from the previous time period. I just assumed Splunk could do this easily so how - there's ALWAYS a way to do it with Splunk but this may just be easier for me to knock it out in Excel.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Aug 2014 02:51:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-differences-of-a-field-s-values-between-time-ranges/m-p/178223#M51266</guid>
      <dc:creator>davespatz</dc:creator>
      <dc:date>2014-08-14T02:51:30Z</dc:date>
    </item>
  </channel>
</rss>

