<?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: locating dead hosts in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/locating-dead-hosts/m-p/40573#M9348</link>
    <description>&lt;P&gt;This almost worked!  I made one minor change:&lt;/P&gt;

&lt;P&gt;| metadata type=hosts | where lastTime &amp;lt; relative_time(now(),"-2h")  AND totalCount &amp;gt;0 &lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 21 Nov 2012 13:49:59 GMT</pubDate>
    <dc:creator>rbellini</dc:creator>
    <dc:date>2012-11-21T13:49:59Z</dc:date>
    <item>
      <title>locating dead hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/locating-dead-hosts/m-p/40570#M9345</link>
      <description>&lt;P&gt;I am trying to get a report of all hosts that have not reported any events in the last 2 hours.  I am using:&lt;/P&gt;

&lt;P&gt;| metadata type=hosts | search totalCount &amp;gt;0 AND lastTime &amp;lt; now-2h&lt;/P&gt;

&lt;P&gt;It only reports hosts that have a totalCount &amp;gt;0 yet it ignores the lastTime qualifier.&lt;/P&gt;

&lt;P&gt;Any suggestions?&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2012 17:26:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/locating-dead-hosts/m-p/40570#M9345</guid>
      <dc:creator>rbellini</dc:creator>
      <dc:date>2012-11-20T17:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: locating dead hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/locating-dead-hosts/m-p/40571#M9346</link>
      <description>&lt;P&gt;My method  is to save a list of the hosts with a scheduled lookup, that updated every week&lt;BR /&gt;
then use it in a join to compare to the list of the hosts who sent data in the last hour.&lt;/P&gt;

&lt;P&gt;generate the lookup with last week hosts&lt;BR /&gt;
earliest=-7d@d latest=-14d@d, scheduled to run every week&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;* | stats count AS previouscount by host | outputlookup host_previousweek.csv&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;scheduled test to compare to current hosts. (like last 2 hours)&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| inputlookup host_previousweek.csv | JOIN type=outer  host&lt;BR /&gt;
[ search * | stats count AS currentcount by host    ] &lt;BR /&gt;
| eval check_test=if(isnull(currentcount),"missing",if(isnull(previouscount),"new","present"))&lt;BR /&gt;
| WHERE check_test="missing"&lt;BR /&gt;
&lt;/CODE&gt;&lt;BR /&gt;
And alert on missing.&lt;BR /&gt;
If you need to update the host lookup, run it manually&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2012 18:30:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/locating-dead-hosts/m-p/40571#M9346</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2012-11-20T18:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: locating dead hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/locating-dead-hosts/m-p/40572#M9347</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| metadata type=hosts totalCount &amp;gt;0 | where lastTime &amp;lt; relative_time(now(),"-2h")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;now() is only available in eval and where clauses.&lt;/P&gt;

&lt;P&gt;You could not use &lt;CODE&gt;relative_time()&lt;/CODE&gt; and just instead use &lt;CODE&gt;now()-(60*60*2)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2012 18:34:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/locating-dead-hosts/m-p/40572#M9347</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2012-11-20T18:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: locating dead hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/locating-dead-hosts/m-p/40573#M9348</link>
      <description>&lt;P&gt;This almost worked!  I made one minor change:&lt;/P&gt;

&lt;P&gt;| metadata type=hosts | where lastTime &amp;lt; relative_time(now(),"-2h")  AND totalCount &amp;gt;0 &lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2012 13:49:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/locating-dead-hosts/m-p/40573#M9348</guid>
      <dc:creator>rbellini</dc:creator>
      <dc:date>2012-11-21T13:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: locating dead hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/locating-dead-hosts/m-p/40574#M9349</link>
      <description>&lt;P&gt;This also worked:&lt;/P&gt;

&lt;P&gt;| metadata type=hosts  | where lastTime &amp;lt;(now()-7200) AND totalCount &amp;gt;0&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2012 13:57:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/locating-dead-hosts/m-p/40574#M9349</guid>
      <dc:creator>rbellini</dc:creator>
      <dc:date>2012-11-21T13:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: locating dead hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/locating-dead-hosts/m-p/40575#M9350</link>
      <description>&lt;P&gt;This presents a totall new concept on locating missing hosts!&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2012 19:48:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/locating-dead-hosts/m-p/40575#M9350</guid>
      <dc:creator>rbellini</dc:creator>
      <dc:date>2012-11-21T19:48:07Z</dc:date>
    </item>
  </channel>
</rss>

