<?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: Search to Identify when a host stops sending logs to Splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-to-Identify-when-a-host-stops-sending-logs-to-Splunk/m-p/258999#M189617</link>
    <description>&lt;P&gt;Hi Twinspop,&lt;/P&gt;

&lt;P&gt;Thanks for this new search, it appears to work better than the Metadata. Just curious, If I understand properly, this search looks at logs as far back as I specify in my time selector and identifies hosts that haven't reported in the time specified in the search age criteria (search age &amp;gt; 86400) in this case more than a day?&lt;/P&gt;

&lt;P&gt;Is that what this search does?&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jul 2016 16:22:58 GMT</pubDate>
    <dc:creator>Makinde</dc:creator>
    <dc:date>2016-07-13T16:22:58Z</dc:date>
    <item>
      <title>Search to Identify when a host stops sending logs to Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-Identify-when-a-host-stops-sending-logs-to-Splunk/m-p/258995#M189613</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have this search string to identify hosts that have stopped sending logs to Splunk, however the search string below identifies every hosts that has ever stopped sending logs, however I want only hosts that have not sent any logs in the past 3 days. What do I need to change in this search string to get that number?&lt;/P&gt;

&lt;P&gt;|metadata type=hosts | eval age = now() - lastTime | search age &amp;gt; 86400 | sort age d | convert ctime(lastTime) | fields age,host,lastTime&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 15:37:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-Identify-when-a-host-stops-sending-logs-to-Splunk/m-p/258995#M189613</guid>
      <dc:creator>Makinde</dc:creator>
      <dc:date>2016-07-13T15:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Search to Identify when a host stops sending logs to Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-Identify-when-a-host-stops-sending-logs-to-Splunk/m-p/258996#M189614</link>
      <description>&lt;P&gt;Hi Makinde, something like this should work (could probably drop the 86400 down closer to now to be more inclusive)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|metadata type=hosts | eval age = now() - lastTime | search age &amp;gt; 86400 AND age &amp;lt; 259200 | sort age d | convert ctime(lastTime) | fields age,host,lastTime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please let me know if this answers your question!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 15:43:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-Identify-when-a-host-stops-sending-logs-to-Splunk/m-p/258996#M189614</guid>
      <dc:creator>muebel</dc:creator>
      <dc:date>2016-07-13T15:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Search to Identify when a host stops sending logs to Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-Identify-when-a-host-stops-sending-logs-to-Splunk/m-p/258997#M189615</link>
      <description>&lt;P&gt;I would probably use &lt;CODE&gt;tstats&lt;/CODE&gt; instead of &lt;CODE&gt;metadata&lt;/CODE&gt;, and just set the time selector to last 3 &lt;EM&gt;days&lt;/EM&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats latest(_time) as lastTime by host | 
eval age=now()-lastTime | 
search age &amp;gt; 86400 | 
sort age d | 
convert ctime(lastTime) | 
fields age,host,lastTime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Metadata can yield unexpected results when you set a timeframe.&lt;/P&gt;

&lt;P&gt;EDIT: changed to days from hours. Doh!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 15:57:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-Identify-when-a-host-stops-sending-logs-to-Splunk/m-p/258997#M189615</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2016-07-13T15:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Search to Identify when a host stops sending logs to Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-Identify-when-a-host-stops-sending-logs-to-Splunk/m-p/258998#M189616</link>
      <description>&lt;P&gt;Hi Muebel,&lt;/P&gt;

&lt;P&gt;The new search definitely makes a change in my results however I noticed it doesn't identify hosts that stopped sending logs older than 3 days ago. So say a host stopped sending logs last month and it hasn't sent any logs up until now that won't show up in this search result.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 16:13:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-Identify-when-a-host-stops-sending-logs-to-Splunk/m-p/258998#M189616</guid>
      <dc:creator>Makinde</dc:creator>
      <dc:date>2016-07-13T16:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Search to Identify when a host stops sending logs to Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-Identify-when-a-host-stops-sending-logs-to-Splunk/m-p/258999#M189617</link>
      <description>&lt;P&gt;Hi Twinspop,&lt;/P&gt;

&lt;P&gt;Thanks for this new search, it appears to work better than the Metadata. Just curious, If I understand properly, this search looks at logs as far back as I specify in my time selector and identifies hosts that haven't reported in the time specified in the search age criteria (search age &amp;gt; 86400) in this case more than a day?&lt;/P&gt;

&lt;P&gt;Is that what this search does?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 16:22:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-Identify-when-a-host-stops-sending-logs-to-Splunk/m-p/258999#M189617</guid>
      <dc:creator>Makinde</dc:creator>
      <dc:date>2016-07-13T16:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Search to Identify when a host stops sending logs to Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-Identify-when-a-host-stops-sending-logs-to-Splunk/m-p/259000#M189618</link>
      <description>&lt;P&gt;Correct. The tstats command will follow your time restraint. This command will initially find all hosts that have logged any data in the last 3 days in any index. The filtering will then only show those that stopped more 86400 seconds ago.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 16:30:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-Identify-when-a-host-stops-sending-logs-to-Splunk/m-p/259000#M189618</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2016-07-13T16:30:31Z</dc:date>
    </item>
  </channel>
</rss>

