<?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 do you make a search that returns hosts that haven't checked in to an external source within a certain time frame? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396992#M174456</link>
    <description>&lt;P&gt;This worked out thanks again. Greatly appreciated.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Nov 2018 02:36:39 GMT</pubDate>
    <dc:creator>jj39501</dc:creator>
    <dc:date>2018-11-21T02:36:39Z</dc:date>
    <item>
      <title>How do you make a search that returns hosts that haven't checked in to an external source within a certain time frame?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396987#M174451</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;

&lt;P&gt;I am relatively new to Splunk and need some help on this search query. I have hosts that are required to check in periodically to an external source. However, I want to know what host have failed to do so in, lets say, the last 24 hours. Here is what I have so far.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="web" src_requires_av=true dest=requiredsite.com | table src_ip, src_nt_host, src_mac src_bunit | dedup src_ip, src_mac
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This outputs all devices that have successfully checked in, but I want the output to be for devices that have &lt;STRONG&gt;&lt;EM&gt;not checked in&lt;/EM&gt;&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 04:41:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396987#M174451</guid>
      <dc:creator>jj39501</dc:creator>
      <dc:date>2018-11-20T04:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do you make a search that returns hosts that haven't checked in to an external source within a certain time frame?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396988#M174452</link>
      <description>&lt;P&gt;Make a list of hosts that should check in and compare the list with your search results, or search over more than 24 hours and filter for hosts that have checked in but their latest check-in is older than 24 hours. Examples:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="web" src_requires_av=true dest=requiredsite.com earliest=-48h latest=now | dedup src_ip, src_mac | table _time src_ip, src_nt_host, src_mac src_bunit | where _time &amp;lt; relative_time(now(), "-24h")

sourcetype="web" src_requires_av=true dest=requiredsite.com earliest=-24h latest=now | dedup src_ip, src_mac | table _time src_ip, src_nt_host, src_mac src_bunit | inputlookup append=t hosts_that_should_check_in | stats latest(_time) as latest_time by src_ip, src_nt_host, src_mac src_bunit | where isnull(latest_time)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note, I've swapped dedup and table for significantly better performance in a distributed search environment. This way indexers can dedup before sending the table back to the search head.&lt;BR /&gt;
The list in my example would need to contain src_ip, src_nt_host, src_mac src_bunit.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:05:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396988#M174452</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2020-09-29T22:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do you make a search that returns hosts that haven't checked in to an external source within a certain time frame?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396989#M174453</link>
      <description>&lt;P&gt;Martin,&lt;/P&gt;

&lt;P&gt;Thank you for the prompt feedback. I will give this a shot and let you know how it goes. &lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 21:36:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396989#M174453</guid>
      <dc:creator>jj39501</dc:creator>
      <dc:date>2018-11-20T21:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do you make a search that returns hosts that haven't checked in to an external source within a certain time frame?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396990#M174454</link>
      <description>&lt;P&gt;hi @jj39501 &lt;/P&gt;

&lt;P&gt;Did this answer solve your problem? If so, please resolve this post by approving it! If your problem is still not solved, keep us updated so that someone else can help ya. Thanks for posting!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 23:09:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396990#M174454</guid>
      <dc:creator>mstjohn_splunk</dc:creator>
      <dc:date>2018-11-20T23:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do you make a search that returns hosts that haven't checked in to an external source within a certain time frame?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396991#M174455</link>
      <description>&lt;P&gt;Run this search for at least &lt;CODE&gt;Last 24-hours&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats max(_indextime) AS lastSentTime WHERE index=* OR index=_* BY host sourcetype
| eval silentTime = now() - lastSentTime
| eval silentForTwelveHours = if(silentTime &amp;gt; (12 * 60 * 60), "***YES***", "no")
| eval silentTime = tostring(silentTime, "duration")
| eventstats max(lastSentTime) AS lastSentTimeHost count(eval(silentForTwelveHours=="***YES***")) AS silent BY host
| where silent&amp;gt;0
| stats list(sourcetype) list(lastSentTime) list(silentTime) list(silentForTwelveHours) first(lastSentTimeHost) BY host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There are MANY ways to crack this nut.  Also, be aware that this is the &lt;CODE&gt;Sentinel Search&lt;/CODE&gt; problem discussed (with solution) here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://conf.splunk.com/session/2015/conf2015-LookupTalk.pdf"&gt;https://conf.splunk.com/session/2015/conf2015-LookupTalk.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 23:54:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396991#M174455</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-11-20T23:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do you make a search that returns hosts that haven't checked in to an external source within a certain time frame?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396992#M174456</link>
      <description>&lt;P&gt;This worked out thanks again. Greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 02:36:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396992#M174456</guid>
      <dc:creator>jj39501</dc:creator>
      <dc:date>2018-11-21T02:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do you make a search that returns hosts that haven't checked in to an external source within a certain time frame?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396993#M174457</link>
      <description>&lt;P&gt;Woodcock,&lt;/P&gt;

&lt;P&gt;Thanks for you help as well. I will keep this in mind if variables in my environment change.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 02:37:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396993#M174457</guid>
      <dc:creator>jj39501</dc:creator>
      <dc:date>2018-11-21T02:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do you make a search that returns hosts that haven't checked in to an external source within a certain time frame?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396994#M174458</link>
      <description>&lt;P&gt;Posters cannot accept more than on answer but anything can get &lt;CODE&gt;UpVoted&lt;/CODE&gt;...&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 02:51:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-search-that-returns-hosts-that-haven-t-checked/m-p/396994#M174458</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-11-21T02:51:11Z</dc:date>
    </item>
  </channel>
</rss>

