<?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 two time frames with the same search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Comparing-two-time-frames-with-the-same-search/m-p/630021#M218868</link>
    <description>&lt;P&gt;First of all, be careful with the word "event" when talking about Splunk search because if you use tstats, you cannot retrieve what Splunk defines as an "event". &amp;nbsp;So, I assume that your events carries an identifying field, say "eventID", and that you want to find which eventID's exist in the 90-day search but not in the 30-day search. Is this correct?&lt;/P&gt;&lt;P&gt;For this, you can do something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where earliest=-30d by eventID
| eval thisis = "30day"
| append
    [| tstats count where earliest=-90d by eventID
    | eval thisis = "90day"]
| stats values(thisis) as thisis by eventID
| where mvcount(thisis) == 1 AND thisis == "90day"&lt;/LI-CODE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 07:32:48 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2023-02-08T07:32:48Z</dc:date>
    <item>
      <title>Comparing two time frames with the same search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-two-time-frames-with-the-same-search/m-p/629988#M218857</link>
      <description>&lt;P&gt;So I have a search I run for an alert which looks for a missing event, it's a simple tstats that shows stuff within the last 30 days I would like to compare the 90 days variant in the same search and determine the missing events.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 16:44:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-two-time-frames-with-the-same-search/m-p/629988#M218857</guid>
      <dc:creator>Orangebottle76</dc:creator>
      <dc:date>2023-02-08T16:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two time frames with the same search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-two-time-frames-with-the-same-search/m-p/630021#M218868</link>
      <description>&lt;P&gt;First of all, be careful with the word "event" when talking about Splunk search because if you use tstats, you cannot retrieve what Splunk defines as an "event". &amp;nbsp;So, I assume that your events carries an identifying field, say "eventID", and that you want to find which eventID's exist in the 90-day search but not in the 30-day search. Is this correct?&lt;/P&gt;&lt;P&gt;For this, you can do something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where earliest=-30d by eventID
| eval thisis = "30day"
| append
    [| tstats count where earliest=-90d by eventID
    | eval thisis = "90day"]
| stats values(thisis) as thisis by eventID
| where mvcount(thisis) == 1 AND thisis == "90day"&lt;/LI-CODE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 07:32:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-two-time-frames-with-the-same-search/m-p/630021#M218868</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-02-08T07:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two time frames with the same search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-two-time-frames-with-the-same-search/m-p/630035#M218871</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for the reply! I am doing it for hosts to see which are missing.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 08:26:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-two-time-frames-with-the-same-search/m-p/630035#M218871</guid>
      <dc:creator>Orangebottle76</dc:creator>
      <dc:date>2023-02-08T08:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two time frames with the same search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-two-time-frames-with-the-same-search/m-p/630057#M218873</link>
      <description>&lt;P&gt;In that case, host field is "eventID"&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 09:33:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-two-time-frames-with-the-same-search/m-p/630057#M218873</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-02-08T09:33:51Z</dc:date>
    </item>
  </channel>
</rss>

