<?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 can I identify hosts that don't have any events over a 4-hour period and create an alert? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291945#M88178</link>
    <description>&lt;P&gt;Hi blacknight659,&lt;BR /&gt;
you have to create a lookup containing all the hosts in your perimeter to monitor (e.g. perimeter.csv, with one column called "host") and then run a search like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ind1 earliest=-4h latest=now
| eval host=upper(host)
| stats count BY host
| append [ | inputlookup perimeter.csv | eval count=0, host=upper(host)  | fields host ]
| stats sum(count) AS Total BY host
| where Total=0
| table host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Deleting the row "|where Total=0" you can have a situation of your perimeter to display in a dashboard (also in graphic mode).&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 10 Oct 2017 07:41:01 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-10-10T07:41:01Z</dc:date>
    <item>
      <title>How can I identify hosts that don't have any events over a 4-hour period and create an alert?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291941#M88174</link>
      <description>&lt;P&gt;I want to identify any host that doesn't have any events over a four hour period and create an alert.  Having trouble extracting the individual host.&lt;/P&gt;

&lt;P&gt;index=ind1&lt;BR /&gt;
| timechart span=4h count by host&lt;BR /&gt;
| where count = 0&lt;BR /&gt;
| table host count time&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 21:10:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291941#M88174</guid>
      <dc:creator>glenngermiathen</dc:creator>
      <dc:date>2017-10-09T21:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: How can I identify hosts that don't have any events over a 4-hour period and create an alert?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291942#M88175</link>
      <description>&lt;P&gt;This is tough, because it is easier to look for something that is there rather than something that is not. Also, showing that over a timechart might not be easy. &lt;/P&gt;

&lt;P&gt;I have a solution I would like for you to consider. I am not 100% sure it will work, but it would be worth testing. If your hosts don't change, then you could use a  inputlookup and use a subsearch to find only the list of host you care about. &lt;/P&gt;

&lt;P&gt;index=ind1 [|inputlookup hosts.csv | fields host]&lt;BR /&gt;
| transaction host maxspan=4h&lt;BR /&gt;
| rename linecount as LogCount&lt;BR /&gt;
| stats count as count sum(LogCount) &lt;BR /&gt;
| table host linecount&lt;BR /&gt;
| fillnull value="null"&lt;/P&gt;

&lt;P&gt;If this works, then you can make a search at the end of this to find all the "null" hosts. &lt;/P&gt;

&lt;P&gt;I hope this helps. &lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 21:48:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291942#M88175</guid>
      <dc:creator>blacknight659</dc:creator>
      <dc:date>2017-10-09T21:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: How can I identify hosts that don't have any events over a 4-hour period and create an alert?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291943#M88176</link>
      <description>&lt;P&gt;You could use the &lt;CODE&gt;metadata&lt;/CODE&gt; command for type=hosts.  Splunk keeps track of all hosts that have sent data, including the first and last time of the events it has received.  I have a similar one I use for this.  The query below shows the hosts that have sent data within the last 24 hours, but not within the last 4 hours.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=hosts index=ind1
| where recentTime &amp;lt; relative_time(now(), "-4h") AND recentTime &amp;gt; relative_time(now(), "-24h") 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Oct 2017 21:56:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291943#M88176</guid>
      <dc:creator>justinatpnnl</dc:creator>
      <dc:date>2017-10-09T21:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can I identify hosts that don't have any events over a 4-hour period and create an alert?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291944#M88177</link>
      <description>&lt;P&gt;Hey @glenngermiathen, if they solved your problem, remember to "√Accept" an answer to award karma points &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 00:27:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291944#M88177</guid>
      <dc:creator>lfedak_splunk</dc:creator>
      <dc:date>2017-10-10T00:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I identify hosts that don't have any events over a 4-hour period and create an alert?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291945#M88178</link>
      <description>&lt;P&gt;Hi blacknight659,&lt;BR /&gt;
you have to create a lookup containing all the hosts in your perimeter to monitor (e.g. perimeter.csv, with one column called "host") and then run a search like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ind1 earliest=-4h latest=now
| eval host=upper(host)
| stats count BY host
| append [ | inputlookup perimeter.csv | eval count=0, host=upper(host)  | fields host ]
| stats sum(count) AS Total BY host
| where Total=0
| table host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Deleting the row "|where Total=0" you can have a situation of your perimeter to display in a dashboard (also in graphic mode).&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 07:41:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291945#M88178</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-10-10T07:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can I identify hosts that don't have any events over a 4-hour period and create an alert?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291946#M88179</link>
      <description>&lt;P&gt;Thanks for the suggestion!  I thought about using the static lookup, but the challenge that creates is that it must be maintained.  If new hosts are added that I am not aware of they will not be monitored.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 13:58:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291946#M88179</guid>
      <dc:creator>glenngermiathen</dc:creator>
      <dc:date>2017-10-10T13:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I identify hosts that don't have any events over a 4-hour period and create an alert?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291947#M88180</link>
      <description>&lt;P&gt;Exactly what I needed, thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 15:55:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-identify-hosts-that-don-t-have-any-events-over-a-4/m-p/291947#M88180</guid>
      <dc:creator>glenngermiathen</dc:creator>
      <dc:date>2017-10-10T15:55:18Z</dc:date>
    </item>
  </channel>
</rss>

