<?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: Get all events/fields from latest data of an Index in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490699#M4283</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/30486"&gt;@rajeshjlnt&lt;/a&gt;,&lt;BR /&gt;
if the csv file has a different name for each file (in other words a date in its name), you can use this to filter events, something like this:&lt;BR /&gt;
e.g. if the csv is named your_csv_2020-03-11.csv and you have a different one every day with a different name, you can run something like this:&lt;BR /&gt;
index=your_index [ index=your_index | head 1 | fields source ]&lt;BR /&gt;
| ...&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 04:36:39 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2020-09-30T04:36:39Z</dc:date>
    <item>
      <title>Get all events/fields from latest data of an Index</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490694#M4278</link>
      <description>&lt;P&gt;We have an index 'abc' to which data gets fed in non-uniform intervals. I would like to get all events of this index that were indexed recently. Could i get some guidance on how to achieve this?&lt;/P&gt;

&lt;P&gt;Ex: Data indexed on 1st of March, 5th of March and 10th of March. I want to get all events indexed on 10th of March.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 11:44:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490694#M4278</guid>
      <dc:creator>rajeshjlnt</dc:creator>
      <dc:date>2020-03-11T11:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Get all events/fields from latest data of an Index</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490695#M4279</link>
      <description>&lt;P&gt;You can filter data on index time also.  Use index command with _index_earliest and _index_latest.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal  _index_earliest=-5m@m _index_latest=@m
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:32:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490695#M4279</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-09-30T04:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get all events/fields from latest data of an Index</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490696#M4280</link>
      <description>&lt;P&gt;Hi @rajeshjlnt&lt;BR /&gt;
I think that you're speaking of events that are indexed with a timestamp really different with the indexing date.&lt;/P&gt;

&lt;P&gt;To do this at first you have to find a time period where you are sure that contains all the events indexed in the monitoring period; in other words, if you index today events of last year, and you select as time frame the last month, you'll not have all the events in you results.&lt;BR /&gt;
Then you have to use the _indextime field that are present in all the events (in epochtime).&lt;/P&gt;

&lt;P&gt;You have to run something like this (e.g. in the last 30 days):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=your_index earliest=-30d latest=now
| eval indextime=strftime(_indextime, "%Y-%m-%d %H:%M:%S"), diff=_time-_indextime
| table _time indextime diff
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ciao,&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 12:16:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490696#M4280</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-03-11T12:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Get all events/fields from latest data of an Index</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490697#M4281</link>
      <description>&lt;P&gt;@manjunathmeti , this is similar to time range picker. May be i am missing something, how can this help in getting the latest indexed set of events?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 13:31:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490697#M4281</guid>
      <dc:creator>rajeshjlnt</dc:creator>
      <dc:date>2020-03-11T13:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get all events/fields from latest data of an Index</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490698#M4282</link>
      <description>&lt;P&gt;@gcusello , in my case _time and _indextime. I understand how timestamps work in splunk. Let me explain my requirement in more detail.&lt;BR /&gt;
I upload a CSV file with n entries every day with a fixed timestamp. now i want to search and get events from latest uploaded file.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 13:39:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490698#M4282</guid>
      <dc:creator>rajeshjlnt</dc:creator>
      <dc:date>2020-03-11T13:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Get all events/fields from latest data of an Index</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490699#M4283</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/30486"&gt;@rajeshjlnt&lt;/a&gt;,&lt;BR /&gt;
if the csv file has a different name for each file (in other words a date in its name), you can use this to filter events, something like this:&lt;BR /&gt;
e.g. if the csv is named your_csv_2020-03-11.csv and you have a different one every day with a different name, you can run something like this:&lt;BR /&gt;
index=your_index [ index=your_index | head 1 | fields source ]&lt;BR /&gt;
| ...&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:36:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490699#M4283</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-30T04:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Get all events/fields from latest data of an Index</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490700#M4284</link>
      <description>&lt;P&gt;You can use &lt;CODE&gt;_index_earliest=-1h _index_latest=now&lt;/CODE&gt; in your foundational search; for &lt;CODE&gt;March 10&lt;/CODE&gt;, use this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="abc" earliest=0 latetst=@d+100d _index_earliest=1583816400 _index_latest=1583902800
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Mar 2020 14:15:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490700#M4284</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-03-11T14:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get all events/fields from latest data of an Index</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490701#M4285</link>
      <description>&lt;P&gt;This works for me. Great thanks &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&lt;/P&gt;

&lt;P&gt;I made a small modification to your suggestion by adding 'search', without which i got an error&lt;/P&gt;

&lt;P&gt;index=your_index [ search index=your_index | head 1 | fields source ]&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:33:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490701#M4285</guid>
      <dc:creator>rajeshjlnt</dc:creator>
      <dc:date>2020-09-30T04:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Get all events/fields from latest data of an Index</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490702#M4286</link>
      <description>&lt;P&gt;Hi @rajeshjlnt,&lt;BR /&gt;
sorry a little missed!&lt;BR /&gt;
If this answer solves your problem, please accept and/or upvote it for the other users of the Community.&lt;/P&gt;

&lt;P&gt;Ciao and next time!&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 14:36:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Get-all-events-fields-from-latest-data-of-an-Index/m-p/490702#M4286</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-03-11T14:36:41Z</dc:date>
    </item>
  </channel>
</rss>

