<?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: Earliest event in a sourcetype in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Earliest-event-in-a-sourcetype/m-p/99012#M20714</link>
    <description>&lt;P&gt;do you mean you want a human readable date/time ? if yes add this to your search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| convert ctime(firstTime)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 22 Mar 2012 11:39:17 GMT</pubDate>
    <dc:creator>MarioM</dc:creator>
    <dc:date>2012-03-22T11:39:17Z</dc:date>
    <item>
      <title>Earliest event in a sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Earliest-event-in-a-sourcetype/m-p/99011#M20713</link>
      <description>&lt;P&gt;Is there a way to know the earliest event of a specific sourcetype and if the actual event can be viewed for validation?&lt;/P&gt;

&lt;P&gt;I tried the following but it returned an epoch time (earliest and latest) for different sourcetypes which I cannot validate by seeing the actual event.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=sourcetypes sourcetype=proofpoint | stats min(firstTime) as firstTime
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Mar 2012 06:28:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Earliest-event-in-a-sourcetype/m-p/99011#M20713</guid>
      <dc:creator>mcm10285</dc:creator>
      <dc:date>2012-03-22T06:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Earliest event in a sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Earliest-event-in-a-sourcetype/m-p/99012#M20714</link>
      <description>&lt;P&gt;do you mean you want a human readable date/time ? if yes add this to your search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| convert ctime(firstTime)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Mar 2012 11:39:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Earliest-event-in-a-sourcetype/m-p/99012#M20714</guid>
      <dc:creator>MarioM</dc:creator>
      <dc:date>2012-03-22T11:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Earliest event in a sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Earliest-event-in-a-sourcetype/m-p/99013#M20715</link>
      <description>&lt;P&gt;The &lt;CODE&gt;metadata&lt;/CODE&gt; search command won't show you events, just the "meta" data (hence the name) in the system catalog.  If you want to see events of a certain sourcetype, you could just search for those:&lt;/P&gt;

&lt;P&gt;search sourcetype=foo&lt;/P&gt;

&lt;P&gt;To find the chronological first of these, you could try:&lt;/P&gt;

&lt;P&gt;search sourcetype=foo | tail &lt;/P&gt;

&lt;P&gt;(remembering that Splunk returns newest events first, and oldest events last).&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2012 16:07:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Earliest-event-in-a-sourcetype/m-p/99013#M20715</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-03-27T16:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Earliest event in a sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Earliest-event-in-a-sourcetype/m-p/99014#M20716</link>
      <description>&lt;P&gt;Proofpoint now has a beta app that will allow you report on and visualze your Proofpoint Protection Server and TAP data! Check out the new app here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/3727/#/details"&gt;https://splunkbase.splunk.com/app/3727/#/details&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Be sure to follow the instructions listed in the details to get all the needed TA's etc that the app needs to work correctly.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 21:40:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Earliest-event-in-a-sourcetype/m-p/99014#M20716</guid>
      <dc:creator>eckolp2003</dc:creator>
      <dc:date>2017-10-09T21:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Earliest event in a sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Earliest-event-in-a-sourcetype/m-p/99015#M20717</link>
      <description>&lt;P&gt;You could use the &lt;CODE&gt;metadata&lt;/CODE&gt; command as a subsearch, getting the firstTime as the latest time that Splunk should look at:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=proofpoint 
    [| metadata type=sourcetypes 
    | search sourcetype=proofpoint 
    | stats min(firstTime) as latest by sourcetype 
    | eval latest=latest+1] 
| stats earliest(_time) as _time, earliest(_raw) as event by sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried this on a few of my sourcetypes and it seemed to do the trick.  A couple of notes:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Set your timepicker to "All Time"&lt;/LI&gt;
&lt;LI&gt;By setting the minimum firstTime to latest in the subsearch, we are overriding the timepicker to use to search for anything older than the minimum firstTime we found.&lt;/LI&gt;
&lt;LI&gt;I added one to the latest time in the subsearch because Splunk translates latest=timestamp as _time&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 09 Oct 2017 23:14:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Earliest-event-in-a-sourcetype/m-p/99015#M20717</guid>
      <dc:creator>justinatpnnl</dc:creator>
      <dc:date>2017-10-09T23:14:01Z</dc:date>
    </item>
  </channel>
</rss>

