<?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 the latest timestamp by host? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-latest-timestamp-by-host/m-p/393289#M70232</link>
    <description>&lt;P&gt;awesome, glad to know you found a solution !&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2019 17:13:33 GMT</pubDate>
    <dc:creator>DavidHourani</dc:creator>
    <dc:date>2019-05-28T17:13:33Z</dc:date>
    <item>
      <title>How to get the latest timestamp by host?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-latest-timestamp-by-host/m-p/393286#M70229</link>
      <description>&lt;P&gt;I need to list all the hosts with their latest Splunk event timestamps in YYYY-MMM-DD HH24:MI:SS format .&lt;BR /&gt;
Below seems to be suffice , however I am unable to change the date &amp;amp; time format for required results :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tstats latest(_time) where index=abc by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help or insights is appreciated. &lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 16:57:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-latest-timestamp-by-host/m-p/393286#M70229</guid>
      <dc:creator>ppatkar</dc:creator>
      <dc:date>2019-05-28T16:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the latest timestamp by host?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-latest-timestamp-by-host/m-p/393287#M70230</link>
      <description>&lt;P&gt;Hi @ppatkar,&lt;/P&gt;

&lt;P&gt;Does something like this work for you ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats latest(_time) AS _time where index=abc by host | eval _time=strftime(_time,"%m/%d/%y %H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 17:06:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-latest-timestamp-by-host/m-p/393287#M70230</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-28T17:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the latest timestamp by host?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-latest-timestamp-by-host/m-p/393288#M70231</link>
      <description>&lt;P&gt;Thanks David, after searching for similar posts could manage the below :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats latest(_time) AS latest where index=abc by host | convert timeformat="%Y-%m-%d %H:%M:%S" ctime(latest)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 May 2019 17:11:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-latest-timestamp-by-host/m-p/393288#M70231</guid>
      <dc:creator>ppatkar</dc:creator>
      <dc:date>2019-05-28T17:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the latest timestamp by host?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-latest-timestamp-by-host/m-p/393289#M70232</link>
      <description>&lt;P&gt;awesome, glad to know you found a solution !&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 17:13:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-latest-timestamp-by-host/m-p/393289#M70232</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-28T17:13:33Z</dc:date>
    </item>
  </channel>
</rss>

