<?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 an output containing all host details along with their last update times? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700092#M237591</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/272523"&gt;@Sangeeta_1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count latest(_time) AS _time WHERE index=* BY host
| table host -time&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2024 12:48:58 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2024-09-25T12:48:58Z</dc:date>
    <item>
      <title>How to get an output containing all host details along with their last update times?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700061#M237586</link>
      <description>&lt;P&gt;How to get an output containing all host details of all time along with their last update times?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below search is taking huge time, how to get this optimized for faster search -&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=*| fields host, _time 
| stats max(_time) as last_update_time by host
| eval t=now()
| eval days_since_last_update=tonumber(strftime((t-last_update_time),"%d"))-1 
| where days_since_last_update&amp;gt;30
| eval last_update_time=strftime(last_update_time, "%Y-%m-%d %H:%M:%S") 
| table last_update_time host days_since_last_update&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 14:14:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700061#M237586</guid>
      <dc:creator>Sangeeta_1</dc:creator>
      <dc:date>2024-09-25T14:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get an output containing all host details along with their last update times?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700065#M237588</link>
      <description>&lt;LI-CODE lang="markup"&gt;| metadata type=hosts index=*&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 25 Sep 2024 08:09:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700065#M237588</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-09-25T08:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get an output containing all host details along with their last update times?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700092#M237591</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/272523"&gt;@Sangeeta_1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count latest(_time) AS _time WHERE index=* BY host
| table host -time&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 12:48:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700092#M237591</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-09-25T12:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to get an output containing all host details along with their last update times?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700102#M237594</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;for the help. But I am getting future dates like below, but the search was for the last time when I am getting any event w.r.t all the host. I have selected date range as all time. Can you please suggest here?&lt;/P&gt;&lt;TABLE width="300px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="299.333px"&gt;2031-12-11 08:40:08&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="299.333px"&gt;2025-01-11 09:05:56&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="299.333px"&gt;2024-10-30 08:12:49&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 25 Sep 2024 15:14:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700102#M237594</guid>
      <dc:creator>Sangeeta_1</dc:creator>
      <dc:date>2024-09-25T15:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get an output containing all host details along with their last update times?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700104#M237595</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; Thanks for your comment, but metadata contains limited to a certain time in history, like I can get the data for only last 30 days or so.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 15:15:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700104#M237595</guid>
      <dc:creator>Sangeeta_1</dc:creator>
      <dc:date>2024-09-25T15:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get an output containing all host details along with their last update times?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700106#M237597</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/272523"&gt;@Sangeeta_1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;with my search you should have the latest timestamp for each host, if you have future dates, probably you have some event not correctly parsed because it has future timestamps.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 15:37:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700106#M237597</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-09-25T15:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to get an output containing all host details along with their last update times?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700126#M237608</link>
      <description>&lt;P&gt;Does using alltime help?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 18:49:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700126#M237608</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-09-25T18:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get an output containing all host details along with their last update times?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700159#M237626</link>
      <description>&lt;P&gt;This should be fast enough&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats max(_time) AS _time WHERE index=* BY host
| where relative_time(now(), "-30d") &amp;gt; _time
| reltime
| rename reltime as since_last_update
| eval last_update_time = strftime(_time, "%F %T")&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 26 Sep 2024 04:11:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-an-output-containing-all-host-details-along-with/m-p/700159#M237626</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-09-26T04:11:04Z</dc:date>
    </item>
  </channel>
</rss>

