<?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 Finding the latest source file per day in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Finding-the-latest-source-file-per-day/m-p/377585#M172129</link>
    <description>&lt;P&gt;My script runs every 2 hrs per day .But i need the latest file per day for a timerange to do some calculation. &lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2019 07:48:19 GMT</pubDate>
    <dc:creator>Nadhiyaa</dc:creator>
    <dc:date>2019-04-01T07:48:19Z</dc:date>
    <item>
      <title>Finding the latest source file per day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-the-latest-source-file-per-day/m-p/377585#M172129</link>
      <description>&lt;P&gt;My script runs every 2 hrs per day .But i need the latest file per day for a timerange to do some calculation. &lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 07:48:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-the-latest-source-file-per-day/m-p/377585#M172129</guid>
      <dc:creator>Nadhiyaa</dc:creator>
      <dc:date>2019-04-01T07:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the latest source file per day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-the-latest-source-file-per-day/m-p/377586#M172130</link>
      <description>&lt;P&gt;Are you looking for the event(s) related to that latest file, or for the file(name) itself? It would help if you could elaborate a bit on what your data looks like, what the output is that you're after (and perhaps what you have tried so far).&lt;/P&gt;

&lt;P&gt;In general, to get the latest something per day, you could do something along the lines of:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo
| eval day = _time
| bin day span=1d 
| stats latest(source) by day
| convert ctime(day)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which gets you the latest value of the source field per day, for the given index.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 08:21:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-the-latest-source-file-per-day/m-p/377586#M172130</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-04-01T08:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the latest source file per day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-the-latest-source-file-per-day/m-p/377587#M172131</link>
      <description>&lt;P&gt;it works !! Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 05:40:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-the-latest-source-file-per-day/m-p/377587#M172131</guid>
      <dc:creator>Nadhiyaa</dc:creator>
      <dc:date>2019-06-19T05:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the latest source file per day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-the-latest-source-file-per-day/m-p/377588#M172132</link>
      <description>&lt;P&gt;Cool &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I've changed my comment to an answer, so you can mark it as accepted.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 06:39:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-the-latest-source-file-per-day/m-p/377588#M172132</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-06-19T06:39:05Z</dc:date>
    </item>
  </channel>
</rss>

