<?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 only check events from the latest source file in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-only-check-events-from-the-latest-source-file/m-p/260882#M176391</link>
    <description>&lt;P&gt;Try this, assuming the all events from the source have the same &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | eventstats max(_indextime) as it | where it=_time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 20 Oct 2016 13:26:28 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-10-20T13:26:28Z</dc:date>
    <item>
      <title>how to only check events from the latest source file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-only-check-events-from-the-latest-source-file/m-p/260880#M176389</link>
      <description>&lt;P&gt;I have a boat load of log files, whose name contains the timestamp, like this : &lt;BR /&gt;
/DATA/show_cpu.2016101908.gz&lt;BR /&gt;
/DATA/show_cpu.2016102108.gz&lt;/P&gt;

&lt;P&gt;I only want to check the event in the latest file, so I tried following command:&lt;BR /&gt;
&lt;STRONG&gt;&lt;EM&gt;index="&lt;/EM&gt;-cli"  source="&lt;EM&gt;show_cpu&lt;/EM&gt;" | stats latest(source) by deviceId,fiveMinutes,timeStamp&lt;/STRONG&gt;* &lt;/P&gt;

&lt;P&gt;Unfortunately, the search results contains the events from other source file.&lt;BR /&gt;&lt;BR /&gt;
Please help out. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:28:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-only-check-events-from-the-latest-source-file/m-p/260880#M176389</guid>
      <dc:creator>gent79</dc:creator>
      <dc:date>2020-09-29T11:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to only check events from the latest source file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-only-check-events-from-the-latest-source-file/m-p/260881#M176390</link>
      <description>&lt;P&gt;check this one - &lt;BR /&gt;
&lt;PRE&gt;index="-cli" | stats latest(source) by host,deviceId,fiveMinutes,timeStamp*&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;if above wont work, then check these two- &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;pre&amp;gt;index="-cli" | stats latest(source) by host&amp;lt;/pre&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and &lt;BR /&gt;
    &lt;PRE&gt;index="-cli" [search index="-cli" | stats latest(source) by host| table source] | table deviceId,fiveMinutes,timeStamp*&lt;/PRE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 12:00:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-only-check-events-from-the-latest-source-file/m-p/260881#M176390</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-10-20T12:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to only check events from the latest source file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-only-check-events-from-the-latest-source-file/m-p/260882#M176391</link>
      <description>&lt;P&gt;Try this, assuming the all events from the source have the same &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | eventstats max(_indextime) as it | where it=_time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Oct 2016 13:26:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-only-check-events-from-the-latest-source-file/m-p/260882#M176391</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-20T13:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to only check events from the latest source file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-only-check-events-from-the-latest-source-file/m-p/507516#M176392</link>
      <description>&lt;P&gt;Hi...I tried the answer which you provided...It didn't work..is there any other way...&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 10:06:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-only-check-events-from-the-latest-source-file/m-p/507516#M176392</guid>
      <dc:creator>priyaramki16</dc:creator>
      <dc:date>2020-07-06T10:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to only check events from the latest source file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-only-check-events-from-the-latest-source-file/m-p/507517#M176393</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/80737"&gt;@inventsekar&lt;/a&gt;&amp;nbsp;..I tried the solution which u provided...It didnot work is there any other solution&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 10:07:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-only-check-events-from-the-latest-source-file/m-p/507517#M176393</guid>
      <dc:creator>priyaramki16</dc:creator>
      <dc:date>2020-07-06T10:07:20Z</dc:date>
    </item>
  </channel>
</rss>

