<?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: Find unique events in one search and NOT the other in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Find-unique-events-in-one-search-and-NOT-the-other/m-p/540749#M153032</link>
    <description>&lt;P&gt;This worked. Thank you very much&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/49493"&gt;@tscroggins&lt;/a&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Feb 2021 02:02:45 GMT</pubDate>
    <dc:creator>Joe20</dc:creator>
    <dc:date>2021-02-22T02:02:45Z</dc:date>
    <item>
      <title>Find unique events in one search and NOT the other</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-unique-events-in-one-search-and-NOT-the-other/m-p/540689#M152987</link>
      <description>&lt;P&gt;I have events with two keys &lt;STRONG&gt;area&lt;/STRONG&gt; and &lt;STRONG&gt;errortext&lt;/STRONG&gt;. Sample event below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN class="t"&gt;2021-02-20&lt;/SPAN&gt; &lt;SPAN class="t"&gt;19:27:37.599&lt;/SPAN&gt; &lt;SPAN class="t"&gt;GMT&lt;/SPAN&gt;&lt;SPAN&gt;] &lt;/SPAN&gt;&lt;SPAN class="t"&gt;ERROR&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Servlet&lt;/SPAN&gt;&lt;SPAN&gt;|test-event&lt;/SPAN&gt;&lt;SPAN&gt;|&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;element&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;=PlaceOrder&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class="t"&gt;routine=start&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class="t"&gt;receiptNumber=000006&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class="t"&gt;&lt;STRONG&gt;&lt;SPAN class="t a"&gt;errortext&lt;/SPAN&gt;&lt;/STRONG&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Initiating&lt;/SPAN&gt; &lt;SPAN class="t"&gt;ReversePayments&lt;/SPAN&gt; &lt;SPAN class="t"&gt;for&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Order&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class="t"&gt;Reason:&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Inventory&lt;/SPAN&gt; &lt;SPAN class="t"&gt;reservation&lt;/SPAN&gt; &lt;SPAN class="t"&gt;failed"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I need to find :&lt;/P&gt;&lt;P&gt;1. unique events that match &lt;STRONG&gt;element&lt;/STRONG&gt; and &lt;STRONG&gt;errortext&lt;/STRONG&gt; values for a time window -1&lt;/P&gt;&lt;P&gt;2. find the same unique events for a time window-2&amp;nbsp; then&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. find events that are present in time window-1 and NOT in time window-2&amp;nbsp;&lt;/P&gt;&lt;P&gt;To find unique events in time-window-1&amp;nbsp; --I am using the below query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;index=dev sourcetype!=warn &lt;STRONG&gt;element&lt;/STRONG&gt; AND &lt;STRONG&gt;errortext&lt;/STRONG&gt; earliest=@w5 latest=+7d@w6 | dedup &lt;STRONG&gt;element,errortext&lt;/STRONG&gt; | table&amp;nbsp;&lt;STRONG&gt;element,errortext&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I am trying to use search and NOT but not able do so in this case.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SearchOne NOT [ SearchTwo&amp;nbsp;]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2021 03:31:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-unique-events-in-one-search-and-NOT-the-other/m-p/540689#M152987</guid>
      <dc:creator>Joe20</dc:creator>
      <dc:date>2021-02-21T03:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Find unique events in one search and NOT the other</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-unique-events-in-one-search-and-NOT-the-other/m-p/540691#M152989</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231267"&gt;@Joe20&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using an example time window of 24 hours, try:&lt;/P&gt;&lt;P&gt;element=* errortext=* earliest=-24h latest=now NOT [&amp;nbsp;element=* errortext=* earliest=-48h latest=-24h | table element errortext ]&lt;/P&gt;&lt;P&gt;This will return events over the last 24 hours with key field combinations (element AND errortext) that were not present between 48 and 24 hours ago.&lt;/P&gt;&lt;P&gt;You may want to review timestamp extractions and time zone offsets if you frequently need to search for future times, e.g. &lt;A href="mailto:+7d@w6," target="_blank"&gt;+7d@w6,&lt;/A&gt;&amp;nbsp;and those future times are not be design.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2021 05:07:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-unique-events-in-one-search-and-NOT-the-other/m-p/540691#M152989</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2021-02-21T05:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Find unique events in one search and NOT the other</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-unique-events-in-one-search-and-NOT-the-other/m-p/540749#M153032</link>
      <description>&lt;P&gt;This worked. Thank you very much&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/49493"&gt;@tscroggins&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 02:02:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-unique-events-in-one-search-and-NOT-the-other/m-p/540749#M153032</guid>
      <dc:creator>Joe20</dc:creator>
      <dc:date>2021-02-22T02:02:45Z</dc:date>
    </item>
  </channel>
</rss>

