<?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: trigger alert if host is missing reporting based on lookup tabel for source=WinEventLog:Security in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-trigger-alert-if-host-is-missing-reporting-based-on/m-p/606559#M14029</link>
    <description>&lt;P&gt;Thank you so much , logic works .&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2022 19:10:50 GMT</pubDate>
    <dc:creator>vikas_gopal</dc:creator>
    <dc:date>2022-07-21T19:10:50Z</dc:date>
    <item>
      <title>How to trigger alert if host is missing reporting based on lookup tabel for source=WinEventLog:Security?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-trigger-alert-if-host-is-missing-reporting-based-on/m-p/606556#M14027</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;I want to trigger an alert when a particular host for source=WinEventLog:Security is not reporting to splunk from last 1 hour. I have a list of 30 critical hosts and for those I have created a csv lookup as shown below&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;DC_Machines.csv&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;host&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; source&lt;BR /&gt;abc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WinEventLog:Security&lt;BR /&gt;bcd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WinEventLog:Security&lt;BR /&gt;xyz&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WinEventLog:Security&lt;/LI-SPOILER&gt;
&lt;P&gt;&lt;STRONG&gt;What I have achieved so far&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-SPOILER&gt;| inputlookup DC_Machines.csv | join type=left host [metadata type=hosts index=os_windows index=os_windows_dc ]&lt;BR /&gt;| fillnull recentTime&lt;BR /&gt;| where recentTime &amp;lt; relative_time(now(), "-1h")&lt;BR /&gt;| fields host,recentTime,source&lt;/LI-SPOILER&gt;
&lt;P&gt;above gave me a host from lookup table which is not reporting at all(fine) but how about those hosts which are reporting except source=WinEventLog:Security&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;What I want&lt;/STRONG&gt;&lt;BR /&gt;above query should only return those host which is missing only one source=WinEventLog:Security&lt;/P&gt;
&lt;P&gt;My approach might be completely wrong or may be I am missing on something .I tried to add filter on source which is not working in above logic.&lt;/P&gt;
&lt;P&gt;Any suggestions please .&lt;/P&gt;
&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 19:46:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-trigger-alert-if-host-is-missing-reporting-based-on/m-p/606556#M14027</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2022-07-21T19:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: trigger alert if host is missing reporting based on lookup tabel for source=WinEventLog:Security</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-trigger-alert-if-host-is-missing-reporting-based-on/m-p/606557#M14028</link>
      <description>&lt;P&gt;You overcomplicate it &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Just do a&lt;/P&gt;&lt;PRE&gt;| tstats count where sourcetype=WinEventLog:Security AND (index=os_windows OR index=os_windows_dc) AND earliest=-1h by host&lt;/PRE&gt;&lt;P&gt;This will give you list of hosts with corresponding events count&lt;/P&gt;&lt;P&gt;Now you can either append your lookup if you have just a single field named host&lt;/P&gt;&lt;PRE&gt;| inputlookup append=true DC_Machines.csv&lt;/PRE&gt;&lt;P&gt;Or do an append if your lookup has more fields&lt;/P&gt;&lt;PRE&gt;| append [&lt;BR /&gt;&amp;nbsp; | inputlookup DC_Machines.cs&lt;BR /&gt;  | table host &lt;/PRE&gt;&lt;P&gt;And now you have to do the magic trick &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;| fillnull count&lt;/PRE&gt;&lt;P&gt;To get initial zeros for your hosts from lookup.&lt;/P&gt;&lt;P&gt;And finally&lt;/P&gt;&lt;PRE&gt;| stats sum(count) by host&lt;/PRE&gt;&lt;P&gt;Et voila. You can filter the results any way you want - get only zeros, or non-zeros. It's up to you.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 18:40:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-trigger-alert-if-host-is-missing-reporting-based-on/m-p/606557#M14028</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-07-21T18:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: trigger alert if host is missing reporting based on lookup tabel for source=WinEventLog:Security</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-trigger-alert-if-host-is-missing-reporting-based-on/m-p/606559#M14029</link>
      <description>&lt;P&gt;Thank you so much , logic works .&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 19:10:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-trigger-alert-if-host-is-missing-reporting-based-on/m-p/606559#M14029</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2022-07-21T19:10:50Z</dc:date>
    </item>
  </channel>
</rss>

