<?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 latest value and timestamp in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/get-latest-value-and-timestamp/m-p/24132#M4384</link>
    <description>&lt;P&gt;I think you are looking for:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| head 1
| addinfo
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The time the search was executed will be in the &lt;EM&gt;info_search_time&lt;/EM&gt; field&lt;/P&gt;</description>
    <pubDate>Thu, 07 Feb 2013 23:23:29 GMT</pubDate>
    <dc:creator>Paolo_Prigione</dc:creator>
    <dc:date>2013-02-07T23:23:29Z</dc:date>
    <item>
      <title>get latest value and timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-latest-value-and-timestamp/m-p/24129#M4381</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;How would I go about getting the latest value of a search, along with the timestamp of that search? I want to include it in a table. &lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2013 21:28:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-latest-value-and-timestamp/m-p/24129#M4381</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2013-02-07T21:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: get latest value and timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-latest-value-and-timestamp/m-p/24130#M4382</link>
      <description>&lt;P&gt;This would get you the latest result:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | head 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Not sure if that's what you want, hard to guess from the question.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2013 22:43:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-latest-value-and-timestamp/m-p/24130#M4382</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-07T22:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: get latest value and timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-latest-value-and-timestamp/m-p/24131#M4383</link>
      <description>&lt;P&gt;You can also get the most recent value of a particular field using the "first" function in stats:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats first(X)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Feb 2013 23:02:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-latest-value-and-timestamp/m-p/24131#M4383</guid>
      <dc:creator>sbrant_splunk</dc:creator>
      <dc:date>2013-02-07T23:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: get latest value and timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-latest-value-and-timestamp/m-p/24132#M4384</link>
      <description>&lt;P&gt;I think you are looking for:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| head 1
| addinfo
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The time the search was executed will be in the &lt;EM&gt;info_search_time&lt;/EM&gt; field&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2013 23:23:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-latest-value-and-timestamp/m-p/24132#M4384</guid>
      <dc:creator>Paolo_Prigione</dc:creator>
      <dc:date>2013-02-07T23:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: get latest value and timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-latest-value-and-timestamp/m-p/24133#M4385</link>
      <description>&lt;P&gt;Sorry that I wasn't more specific. I want to grab data from the previous hour, and I want to get the value of the last event, along with the timestamp associated with that last event. I'll try these, but I'm don't think they are what I'm looking for...&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2013 04:40:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-latest-value-and-timestamp/m-p/24133#M4385</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2013-02-08T04:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: get latest value and timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-latest-value-and-timestamp/m-p/24134#M4386</link>
      <description>&lt;P&gt;I've found the &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonStatsFunctions"&gt;stat functions&lt;/A&gt; 'earliest' and 'latest' work best for time-dependent field reporting:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats latest(_time) as _time, latest(X)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Mar 2017 18:34:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-latest-value-and-timestamp/m-p/24134#M4386</guid>
      <dc:creator>stoomart</dc:creator>
      <dc:date>2017-03-28T18:34:04Z</dc:date>
    </item>
  </channel>
</rss>

