<?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 alert on logs missing for multiple servers? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386515#M6783</link>
    <description>&lt;P&gt;That was one of the articles I'd found when trying to find a solution.  Unfortunately, that doesn't give me the results I'm looking for.  I tried just &lt;CODE&gt;| metadata type=hosts&lt;/CODE&gt;, and still only see a handful of boxes (10).  There are literally thousands of hosts sending logs to Splunk in the environment, but I only care about a specific subset.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2019 20:00:40 GMT</pubDate>
    <dc:creator>glb</dc:creator>
    <dc:date>2019-04-01T20:00:40Z</dc:date>
    <item>
      <title>How do you alert on logs missing for multiple servers?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386513#M6781</link>
      <description>&lt;P&gt;For various reasons, I want to get alerts when my servers aren't forwarding their event logs to Splunk.  I can do this for one server at a time by scheduling a search like &lt;CODE&gt;index=myindex host=myhost | head 1&lt;/CODE&gt;  for some time window and then alert if there are no results.  &lt;/P&gt;

&lt;P&gt;Of course, there are many hosts on the network for which this would need to be done.  Is there any way I could do this with one scheduled alert using a lookup with a list of the hosts?  I'd be ok with the output being a report of the hosts that haven't forwarded logs in the specified window.   &lt;/P&gt;

&lt;P&gt;I'm a bit of a Splunk novice, so I've searched and found similar questions posted before, but none of the proposed solutions I could find worked correctly.    &lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 15:44:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386513#M6781</guid>
      <dc:creator>glb</dc:creator>
      <dc:date>2019-04-01T15:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do you alert on logs missing for multiple servers?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386514#M6782</link>
      <description>&lt;P&gt;There are few options listed here.&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/108260/alert-or-show-when-a-host-is-down-from-any-index.html"&gt;https://answers.splunk.com/answers/108260/alert-or-show-when-a-host-is-down-from-any-index.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 19:42:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386514#M6782</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-04-01T19:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do you alert on logs missing for multiple servers?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386515#M6783</link>
      <description>&lt;P&gt;That was one of the articles I'd found when trying to find a solution.  Unfortunately, that doesn't give me the results I'm looking for.  I tried just &lt;CODE&gt;| metadata type=hosts&lt;/CODE&gt;, and still only see a handful of boxes (10).  There are literally thousands of hosts sending logs to Splunk in the environment, but I only care about a specific subset.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 20:00:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386515#M6783</guid>
      <dc:creator>glb</dc:creator>
      <dc:date>2019-04-01T20:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do you alert on logs missing for multiple servers?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386516#M6784</link>
      <description>&lt;P&gt;If you already have a lookup table with list of hosts you want to monitor, you can run search like this to setup your alert (alerting if a host is not seen in last 30 min).&lt;/P&gt;

&lt;P&gt;Efficient version&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats max(_time) as lastSeen WHERE index=myindex [| inputlookup yourhostLookup.csv | table host ] by host
| where lastSeen&amp;lt;relative_time(now(),"-30m")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regular version&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=myindex [| inputlookup yourhostLookup.csv | table host ] |  stats  max(_time) as lastSeen by host  | where lastSeen&amp;lt;relative_time(now(),"-30m")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Apr 2019 20:06:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386516#M6784</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-04-01T20:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do you alert on logs missing for multiple servers?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386517#M6785</link>
      <description>&lt;P&gt;Wow, this seems to do what I want!  I'm off to do some testing and verifying results, but this looks promising... I'll confirm later.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 20:27:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386517#M6785</guid>
      <dc:creator>glb</dc:creator>
      <dc:date>2019-04-01T20:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do you alert on logs missing for multiple servers?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386518#M6786</link>
      <description>&lt;P&gt;This is working great, thanks again.  One last question - the output for lastSeen is not a friendly format, and I can't figure out how to change it to something human-readable.   I tried using eval() as I'd seen in a few examples, but it doesn't seem to work.  I just end up with the list of hosts and an empty field where the time should be.  Suggestions?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 14:20:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386518#M6786</guid>
      <dc:creator>glb</dc:creator>
      <dc:date>2019-04-02T14:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do you alert on logs missing for multiple servers?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386519#M6787</link>
      <description>&lt;P&gt;Ah, this seems to work.  &lt;CODE&gt;| eval time=strftime(lastSeen, "%H:%M:%S %m/%d/%Y") &lt;BR /&gt;
| table host time&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 14:52:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-alert-on-logs-missing-for-multiple-servers/m-p/386519#M6787</guid>
      <dc:creator>glb</dc:creator>
      <dc:date>2019-04-02T14:52:02Z</dc:date>
    </item>
  </channel>
</rss>

