<?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 results only from latest source file of particular sourcetype in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-results-only-from-latest-source-file-of-particular/m-p/461237#M191373</link>
    <description>&lt;P&gt;I think &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="index_sdx2" sourcetype=splunk_data [search index="index_sdx2" sourcetype=splunk_data | head 1 | fields source]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;should work.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Oct 2019 09:21:57 GMT</pubDate>
    <dc:creator>knielsen</dc:creator>
    <dc:date>2019-10-16T09:21:57Z</dc:date>
    <item>
      <title>How to get results only from latest source file of particular sourcetype</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-results-only-from-latest-source-file-of-particular/m-p/461236#M191372</link>
      <description>&lt;P&gt;HI,&lt;BR /&gt;
I got an index which send data to sourcetype  with new source file every week.&lt;BR /&gt;
 what I want is to my dashboard search query only return events from the latest source file. &lt;BR /&gt;
For example , my index is - index_sdx2 sourctype is -- splunk_data and there are multiple sources inside this sourcetype  like data1.csv data1_10082019.csv data1_11102019.csv &lt;BR /&gt;
And I want to take only data from latest source , that is all events  from source= data1_11102019.csv&lt;BR /&gt;
I tried like below&lt;BR /&gt;
index="index_sdx2" sourcetype=splunk_data |eventstats first(_time) as time | where _time==time &lt;BR /&gt;
But its not giving all data from source data1_11102019.csv&lt;BR /&gt;
please suggest. &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:38:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-results-only-from-latest-source-file-of-particular/m-p/461236#M191372</guid>
      <dc:creator>avni26</dc:creator>
      <dc:date>2020-09-30T02:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get results only from latest source file of particular sourcetype</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-results-only-from-latest-source-file-of-particular/m-p/461237#M191373</link>
      <description>&lt;P&gt;I think &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="index_sdx2" sourcetype=splunk_data [search index="index_sdx2" sourcetype=splunk_data | head 1 | fields source]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;should work.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 09:21:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-results-only-from-latest-source-file-of-particular/m-p/461237#M191373</guid>
      <dc:creator>knielsen</dc:creator>
      <dc:date>2019-10-16T09:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get results only from latest source file of particular sourcetype</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-results-only-from-latest-source-file-of-particular/m-p/461238#M191374</link>
      <description>&lt;P&gt;@knielsen, yes its working.Thank you. But performance is slow. Its taking too much time load in dashboard.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 09:36:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-results-only-from-latest-source-file-of-particular/m-p/461238#M191374</guid>
      <dc:creator>avni26</dc:creator>
      <dc:date>2019-10-16T09:36:28Z</dc:date>
    </item>
  </channel>
</rss>

