<?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 extract latest events of particular field. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528079#M149087</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi, Thanks for your response. But your query is not returning any results either.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Nov 2020 08:53:42 GMT</pubDate>
    <dc:creator>prateeksawhney</dc:creator>
    <dc:date>2020-11-05T08:53:42Z</dc:date>
    <item>
      <title>How to extract latest events of particular field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/527630#M148955</link>
      <description>&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;I need your help in fetching latest event from a particular field.&lt;/P&gt;&lt;P&gt;Sharing you a sample event&amp;nbsp; and query when I execute for last 15 mins.&lt;/P&gt;&lt;P&gt;Query -&amp;gt; index=Blah sourcetype=blah_blah*&lt;/P&gt;&lt;P&gt;Example event :-&lt;/P&gt;&lt;DIV class="shared-eventsviewer-shared-rawfield"&gt;&lt;DIV class="raw-event normal  wrap "&gt;&lt;SPAN class="t"&gt;2020-11-02&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;05:35:00.319&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;SOURCE=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Tullett&lt;/SPAN&gt;&lt;SPAN&gt;",&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;COUNTVOL=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="t"&gt;879&lt;/SPAN&gt;&lt;SPAN&gt;",&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;TO_CHAR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class="t"&gt;SNAPTIME&lt;/SPAN&gt;&lt;SPAN&gt;,'&lt;/SPAN&gt;&lt;SPAN class="t"&gt;MM/DD/YYHH24:MI:SS&lt;/SPAN&gt;&lt;SPAN&gt;')&lt;/SPAN&gt;&lt;SPAN class="t"&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="t"&gt;08/31/20&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;00:59:00"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="shared-eventsviewer-list-body-row-selectedfields"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="shared-eventsviewer-list-body-row-selectedfields"&gt;Initial date on this event seems to be OK which is todays date"&lt;SPAN class="t"&gt;2020-11-02&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;05:35:00.319&lt;/SPAN&gt;", but date at the end which is field SNAPTIME_NEW seems to be old&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="t"&gt;08/31/20&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;00:59:00"&lt;/SPAN&gt;. Can you please help me with a query so that I see only "todays" events in a sorted manner by date in field SNAPTIME_NEW when I execute query for last 15 mins.&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="shared-eventsviewer-list-body-row-selectedfields"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="shared-eventsviewer-list-body-row-selectedfields"&gt;Screenshot attached.&lt;/DIV&gt;&lt;DIV class="shared-eventsviewer-list-body-row-selectedfields"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="shared-eventsviewer-list-body-row-selectedfields"&gt;Thanks,&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="shared-eventsviewer-list-body-row-selectedfields"&gt;Prateek&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Nov 2020 05:02:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/527630#M148955</guid>
      <dc:creator>prateeksawhney</dc:creator>
      <dc:date>2020-11-05T05:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract latest events of particular field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/527651#M148957</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225274"&gt;@prateeksawhney&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you can use where condition to filter out events which belong to last 15 minutes for the field SNAPTIME_NEW&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval limit = relative_time(now(),"-15m")
| where SNAPTIME_NEW &amp;gt;= limit
| sort SNAPTIME_NEW&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;If the field is not already in epoch time, you will have to convert it using&amp;nbsp;strptime.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 07:41:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/527651#M148957</guid>
      <dc:creator>t_shreya</dc:creator>
      <dc:date>2020-11-03T07:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract latest events of particular field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/527658#M148961</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225841"&gt;@t_shreya&lt;/a&gt;&amp;nbsp; Thanks for your response, but this does not seem to be returning any result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Screenshot attached for your reference.&lt;/P&gt;&lt;P&gt;And yes&amp;nbsp;&lt;SPAN&gt;field is already in epoch time.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 08:19:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/527658#M148961</guid>
      <dc:creator>prateeksawhney</dc:creator>
      <dc:date>2020-11-03T08:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract latest events of particular field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/527671#M148966</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225274"&gt;@prateeksawhney&lt;/a&gt;&amp;nbsp;, if the SNAPTIME_NEW does not have field values that are equal to or greater than the epoch time of the last 15 min, then, it would not return any result.&lt;BR /&gt;&lt;BR /&gt;Does the SNAPTIME_NEW have all the values that are older than last 15 min?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 09:15:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/527671#M148966</guid>
      <dc:creator>t_shreya</dc:creator>
      <dc:date>2020-11-03T09:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract latest events of particular field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528057#M149076</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225841"&gt;@t_shreya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your Question -&amp;nbsp;&lt;/P&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Does the SNAPTIME_NEW have all the values that are older than last 15 min?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Answer - Yes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have updated my question, I need to look for only today's events in a sorted manner.&amp;nbsp; As of now I am getting around 22,000 events in last 15 mins which contain old and new both dates.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Screenshot attached.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Nov 2020 05:05:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528057#M149076</guid>
      <dc:creator>prateeksawhney</dc:creator>
      <dc:date>2020-11-05T05:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract latest events of particular field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528072#M149084</link>
      <description>&lt;LI-CODE lang="markup"&gt;| eval limit = relative_time(now(),"-15m")
| eval SNAPTIME_NEW=strptime(SNAPTIME_NEW,"%m/%d/%y %H:%M:%S")
| where SNAPTIME_NEW &amp;gt;= limit
| sort SNAPTIME_NEW&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 05 Nov 2020 08:20:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528072#M149084</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-11-05T08:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract latest events of particular field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528073#M149085</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225274"&gt;@prateeksawhney&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For today's events you would need to change -15m to @d&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval limit = relative_time(now(),"@d")
| where SNAPTIME_NEW &amp;gt;= limit
| sort SNAPTIME_NEW&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 08:26:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528073#M149085</guid>
      <dc:creator>t_shreya</dc:creator>
      <dc:date>2020-11-05T08:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract latest events of particular field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528078#M149086</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225841"&gt;@t_shreya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This query is not returning any results.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 08:52:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528078#M149086</guid>
      <dc:creator>prateeksawhney</dc:creator>
      <dc:date>2020-11-05T08:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract latest events of particular field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528079#M149087</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi, Thanks for your response. But your query is not returning any results either.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 08:53:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528079#M149087</guid>
      <dc:creator>prateeksawhney</dc:creator>
      <dc:date>2020-11-05T08:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract latest events of particular field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528080#M149088</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225274"&gt;@prateeksawhney&lt;/a&gt;&amp;nbsp;, Can you share details about the field SNAPTIME_NEW, means some of the values that it has in it?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 08:58:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528080#M149088</guid>
      <dc:creator>t_shreya</dc:creator>
      <dc:date>2020-11-05T08:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract latest events of particular field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528082#M149089</link>
      <description>&lt;P&gt;All the events you have shown have old dates in SNAPTIME. Are there any results to be found matching your criteria?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 09:06:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-latest-events-of-particular-field/m-p/528082#M149089</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-11-05T09:06:44Z</dc:date>
    </item>
  </channel>
</rss>

