<?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 work on the latest event only? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447806#M169058</link>
    <description>&lt;P&gt;try &lt;CODE&gt;head&lt;/CODE&gt; command:&lt;BR /&gt;
Returns the first N number of specified results in search order&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | head 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 06 Jun 2018 12:57:17 GMT</pubDate>
    <dc:creator>493669</dc:creator>
    <dc:date>2018-06-06T12:57:17Z</dc:date>
    <item>
      <title>How to work on the latest event only?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447805#M169057</link>
      <description>&lt;P&gt;I have my query ready which essentially extracts some fields and displays in a table.&lt;BR /&gt;
But I want to work on the latest event only. &lt;BR /&gt;
How do I put condition so that my query only works on the latest one event?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 12:52:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447805#M169057</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-06-06T12:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to work on the latest event only?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447806#M169058</link>
      <description>&lt;P&gt;try &lt;CODE&gt;head&lt;/CODE&gt; command:&lt;BR /&gt;
Returns the first N number of specified results in search order&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | head 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Jun 2018 12:57:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447806#M169058</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-06-06T12:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to work on the latest event only?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447807#M169059</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;|sort _time |head 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Jun 2018 13:01:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447807#M169059</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-06-06T13:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to work on the latest event only?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447808#M169060</link>
      <description>&lt;P&gt;Is |sort _time necessary ?&lt;BR /&gt;
Won't |head 1 alone will do the job?&lt;BR /&gt;
Just confirming.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 13:05:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447808#M169060</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-06-06T13:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to work on the latest event only?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447809#M169061</link>
      <description>&lt;P&gt;If it is realtime data it will come updated with head 1 ..or it is saved data it will directly give top of the value head 1 in this situation you have to sort _time than you will get top value as updated. &lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 13:07:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447809#M169061</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-06-06T13:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to work on the latest event only?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447810#M169062</link>
      <description>&lt;P&gt;even if there are duplicates, using &lt;CODE&gt;head 1&lt;/CODE&gt; it will took latest one&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 13:12:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447810#M169062</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-06-06T13:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to work on the latest event only?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447811#M169063</link>
      <description>&lt;P&gt;below example explain how it is works .&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval A=45 
| eval DateHour="2018-06-06 18:47:22.820" 
| append 
    [| makeresults 
| eval A=30 
| eval DateHour="2018-06-06 18:45:22.820" ] 
| append 
    [| makeresults 
| eval A=50 
| eval DateHour="2018-06-06 18:57:22.000" ]  
| fields - _time
| head 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Jun 2018 13:21:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-work-on-the-latest-event-only/m-p/447811#M169063</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-06-06T13:21:46Z</dc:date>
    </item>
  </channel>
</rss>

