<?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 get the list of unique exceptions which are occurring only today but not in the past? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299431#M90240</link>
    <description>&lt;P&gt;try &lt;CODE&gt;earliest=-0d@d&lt;/CODE&gt; instead of &lt;CODE&gt;earliest=-1d@d&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Feb 2018 11:39:44 GMT</pubDate>
    <dc:creator>493669</dc:creator>
    <dc:date>2018-02-20T11:39:44Z</dc:date>
    <item>
      <title>How to get the list of unique exceptions which are occurring only today but not in the past?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299430#M90239</link>
      <description>&lt;P&gt;I am trying this command but looks like its displaying all the exceptions. please let me know how to get the exceptions which are occurring only today but not earlier in splunk&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=x AND (host=y) AND "java.exception" AND earliest=-1d@d latest=now NOT [ | search (index=x) AND (host=y) AND "java.exception" AND earliest=-15d@d latest=-2d@d | rex "(?java?.[.\w]+Exception)" | stats count by Exception | sort by count ] | rex "(?java?.[.\w]+Exception)" | stats count by Exception | sort by count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;| set diff query is also not working. &lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 11:36:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299430#M90239</guid>
      <dc:creator>guru89044</dc:creator>
      <dc:date>2018-02-20T11:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the list of unique exceptions which are occurring only today but not in the past?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299431#M90240</link>
      <description>&lt;P&gt;try &lt;CODE&gt;earliest=-0d@d&lt;/CODE&gt; instead of &lt;CODE&gt;earliest=-1d@d&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 11:39:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299431#M90240</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-20T11:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the list of unique exceptions which are occurring only today but not in the past?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299432#M90241</link>
      <description>&lt;P&gt;yeah but that's not solution. &lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 12:50:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299432#M90241</guid>
      <dc:creator>guru89044</dc:creator>
      <dc:date>2018-02-20T12:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the list of unique exceptions which are occurring only today but not in the past?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299433#M90242</link>
      <description>&lt;P&gt;I think maybe some of the code is getting chomped in your post. I'll assume you are able to successfully execute a straightforward search that extracts the field &lt;CODE&gt;Exception&lt;/CODE&gt; and conclude with &lt;CODE&gt;| stats count by Exception | sort 0 - count&lt;/CODE&gt;. If that's not true, then please try reposting your code by first clicking the &lt;CODE&gt;101010&lt;/CODE&gt; code button and then entering the code in the modal window. &lt;/P&gt;

&lt;P&gt;I'm going to re-state the goal, because I think there is a more straightforward approach to what you want to do. If I understand correctly, you want to list all Exception codes whose first appearance in the last 15 days was today. That can be done in a single search with no subsearches:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=x host=y "java.exception" earliest=-15d@d latest=now 
| rex statement that extracts the Exception field
| stats earliest(_time) AS first_time BY Exception
| where first_time&amp;gt;=relative_time(now(), "@d")
| sort 0 - first_time
| convert ctime(first_time)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The last line just makes the timestamp in the &lt;CODE&gt;first_time&lt;/CODE&gt; field display in human readable format; you won't need it if you plan to use the value in further comparisons or calculations.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 15:13:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299433#M90242</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-02-20T15:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the list of unique exceptions which are occurring only today but not in the past?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299434#M90243</link>
      <description>&lt;P&gt;@elliotproebstel Thank you. my end goal is to compare between 2 time durations.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;find no. of exceptions from  1st Feb 1 to 10th Feb.&lt;/LI&gt;
&lt;LI&gt;find the no. of exceptions from 11th Feb to 15th Feb.&lt;/LI&gt;
&lt;LI&gt;I want only unique exceptions from 11th Feb to 15th Feb which did not occur during 1st Feb 1 to 10th Feb along with count(No. Of. of times new exception occured).&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Please let me know how to compare with 2 time durations&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 05:45:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299434#M90243</guid>
      <dc:creator>guru89044</dc:creator>
      <dc:date>2018-02-21T05:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the list of unique exceptions which are occurring only today but not in the past?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299435#M90244</link>
      <description>&lt;P&gt;Sure, that's actually just a slight variation on the answer above. In the first answer, we gathered all events over 15 days and identified Exceptions that were first seen today. In this new challenge, we'll gather all events that occurred 1 Feb  - 15 Feb and identify Exceptions that were first seen after 10 Feb. Exact same search structure, just different dates!&lt;/P&gt;

&lt;P&gt;With your timepicker for the search, select 1 Feb as the start date and 15 Feb as the end date. We want Splunk to gather events from the overall time window, and then we'll analyze those. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=x host=y "java.exception"
| rex statement that extracts the Exception field
| stats earliest(_time) AS first_time BY Exception
| eval window_start=strptime("2018-02-11", "%F")
| where first_time&amp;gt;=window_start
| stats count by Exception
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Feb 2018 14:46:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299435#M90244</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-02-21T14:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the list of unique exceptions which are occurring only today but not in the past?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299436#M90245</link>
      <description>&lt;P&gt;@elliotproebstel Thank you very much. Now i can play with dates. Can you please explain me the  rex "(?java?.[.\w]+Exception)"? &lt;/P&gt;

&lt;P&gt;Its listing all the exceptions but when continues exceptions are present in the logs like below,  looks like Its considering only first exception and ignoring other 2.  So its listing the exceptions which are not unique also.&lt;/P&gt;

&lt;P&gt;Example : its listing  java.util.concurrent.ExecutionException: as unique even though it occured before like this log.&lt;/P&gt;

&lt;P&gt;logs : (java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: org.xyz....)&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 07:31:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-list-of-unique-exceptions-which-are-occurring/m-p/299436#M90245</guid>
      <dc:creator>guru89044</dc:creator>
      <dc:date>2018-02-22T07:31:48Z</dc:date>
    </item>
  </channel>
</rss>

