<?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: Alert when host stops reporting data (IT Essentials Learn) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Alert-when-host-stops-reporting-data-IT-Essentials-Learn/m-p/578064#M201463</link>
    <description>&lt;P&gt;I found a solution so I'll post it. Unfortunately it doesn't solve the filtering issue. But it's good enough for me.&lt;/P&gt;&lt;P&gt;I ended up splitting out my index into dev and prod groups so I was able to solve this by simply specifying the index (the index performs all the filtering I need).&lt;/P&gt;&lt;P&gt;This search was helpful for me to determine which index to use in the command&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|tstats dc(host) as val max(_time) as _time where index=* host=* by host, index&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I simply modified the two index lines to use the index that I saw referenced in the above search.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Dec 2021 20:19:56 GMT</pubDate>
    <dc:creator>jackjack</dc:creator>
    <dc:date>2021-12-10T20:19:56Z</dc:date>
    <item>
      <title>Alert when host stops reporting data (IT Essentials Learn)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alert-when-host-stops-reporting-data-IT-Essentials-Learn/m-p/576964#M201081</link>
      <description>&lt;P&gt;I am attempting to use a search from IT Essentials Learn named "Alert when host stops reporting data - Linux - IT Essentials Work"&lt;/P&gt;&lt;P&gt;Is it possible to filter this alert by host type? I've performed a number of tests now and it seems my only option is to search against all hosts.&lt;/P&gt;&lt;P&gt;Here is the search from IT Essentials Learn&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|tstats dc(host) as val max(_time) as _time where index="&amp;lt;INDEXES-TO-CHECK&amp;gt;" host="&amp;lt;HOSTS-TO-CHECK&amp;gt;" by host
|append [|metadata type=hosts index="&amp;lt;INDEXES-TO-CHECK&amp;gt;" | table host lastTime | rename lastTime as _time | where _time&amp;gt;now()-(60*60*12) | eval val=0]
|stats max(val) as val max(_time) as _time by host

| where val=0
| rename val as "Has Data"
| eval Missing Duration= tostring(now()-_time, "duration")
| table host "Has Data" "Missing Duration"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I modified the 2 index lines and the host line. If I use * for all 3 it kind of works but checks against every host.&lt;/P&gt;&lt;P&gt;If I use host=*dev* it displays all hosts without the name *dev* as evaluating to 0 whereas all the *dev* hosts get evaluated to 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To counteract this I tried adding a where host=*dev* elsewhere (I tried it in the metadata portion, as a where clause at the end of all the metadata piping, as a where clause next to where val=0, etc.) but this has the effect of just completely removing a host that isn't sending data from the list (or removing all hosts), so that also does not work.&lt;/P&gt;&lt;P&gt;Is it possible to split this up based on hosts or am I stuck with an all or nothing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: I tried adding a where all the way at the end.&lt;/P&gt;&lt;P&gt;It does not work with host="*dev*"&lt;/P&gt;&lt;P&gt;However, I can use host!="some host name" to filter those out.&lt;/P&gt;&lt;P&gt;I'm not sure why I can use negation but not wildcards?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit2: I am searching on the prior 5mins if that matters at all&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 00:33:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alert-when-host-stops-reporting-data-IT-Essentials-Learn/m-p/576964#M201081</guid>
      <dc:creator>jackjack</dc:creator>
      <dc:date>2021-12-02T00:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Alert when host stops reporting data (IT Essentials Learn)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alert-when-host-stops-reporting-data-IT-Essentials-Learn/m-p/577069#M201106</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;this issue is already hanlded couple of times &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is one old post where is links to other articles / ways to handle this quite efficient.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/How-do-I-check-to-see-if-a-couple-of-Hosts-are-sending-data-to/m-p/544060" target="_blank"&gt;https://community.splunk.com/t5/Getting-Data-In/How-do-I-check-to-see-if-a-couple-of-Hosts-are-sending-data-to/m-p/544060&lt;/A&gt;&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 14:47:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alert-when-host-stops-reporting-data-IT-Essentials-Learn/m-p/577069#M201106</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-12-02T14:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Alert when host stops reporting data (IT Essentials Learn)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alert-when-host-stops-reporting-data-IT-Essentials-Learn/m-p/577105#M201120</link>
      <description>&lt;P&gt;I always perform a search before asking a question. I did not find my specific question answered.&lt;/P&gt;&lt;P&gt;I am able to search across ALL hosts however my issue specifically is that I cannot figure out how to split them by host name.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looked through the post you linked and this is the only link that may be helpful:&amp;nbsp;&lt;A href="https://www.duanewaddle.com/proving-a-negative/" target="_blank"&gt;https://www.duanewaddle.com/proving-a-negative/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However that is still a fundamentally different process using lookup tables and it's performing a count instead of looking at the last time sent.&lt;/P&gt;&lt;P&gt;Are you suggesting that my method, which is presented by splunk itself through the IT Essentials Learn App, will not work? Can I not filter using something similar to one of the methods I attempted in my original post?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 17:28:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alert-when-host-stops-reporting-data-IT-Essentials-Learn/m-p/577105#M201120</guid>
      <dc:creator>jackjack</dc:creator>
      <dc:date>2021-12-02T17:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Alert when host stops reporting data (IT Essentials Learn)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alert-when-host-stops-reporting-data-IT-Essentials-Learn/m-p/578064#M201463</link>
      <description>&lt;P&gt;I found a solution so I'll post it. Unfortunately it doesn't solve the filtering issue. But it's good enough for me.&lt;/P&gt;&lt;P&gt;I ended up splitting out my index into dev and prod groups so I was able to solve this by simply specifying the index (the index performs all the filtering I need).&lt;/P&gt;&lt;P&gt;This search was helpful for me to determine which index to use in the command&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|tstats dc(host) as val max(_time) as _time where index=* host=* by host, index&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I simply modified the two index lines to use the index that I saw referenced in the above search.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:19:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alert-when-host-stops-reporting-data-IT-Essentials-Learn/m-p/578064#M201463</guid>
      <dc:creator>jackjack</dc:creator>
      <dc:date>2021-12-10T20:19:56Z</dc:date>
    </item>
  </channel>
</rss>

