<?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 How to schedule search and alert for Windows services that are &amp;quot;Stopped&amp;quot;, set to &amp;quot;Auto&amp;quot; and system uptime is &amp;lt; 86400 seconds in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-schedule-search-and-alert-for-Windows-services-that-are/m-p/120016#M1808</link>
    <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;I'm hoping someone can help me assemble this search &amp;amp; alert.  &lt;/P&gt;

&lt;P&gt;We have two indexes:&lt;BR /&gt;&lt;BR /&gt;
index_evt is for windows event logs&lt;BR /&gt;
index_perf contains all performance metrics &amp;amp; windows service information&lt;/P&gt;

&lt;P&gt;I want to create a search that&lt;BR /&gt;
 -  Searches index_perf (source=WMI:Services) for any service that contains "IBM" in the service name, that is "Stopped" and is also set to "Auto" for startup type within the past 2 hours. &lt;BR /&gt;
 -  Searches index_evt (sourcetype="WinEventLog:System") for system uptime is &amp;lt; 86400 seconds.&lt;/P&gt;

&lt;P&gt;We're looking for windows services that should be running after reboots of windows servers.  &lt;/P&gt;

&lt;P&gt;Your help is truly appreciated.  &lt;/P&gt;

&lt;P&gt;Thanks.  &lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 17:32:57 GMT</pubDate>
    <dc:creator>agoktas</dc:creator>
    <dc:date>2020-09-28T17:32:57Z</dc:date>
    <item>
      <title>How to schedule search and alert for Windows services that are "Stopped", set to "Auto" and system uptime is &lt; 86400 seconds</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-schedule-search-and-alert-for-Windows-services-that-are/m-p/120016#M1808</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;I'm hoping someone can help me assemble this search &amp;amp; alert.  &lt;/P&gt;

&lt;P&gt;We have two indexes:&lt;BR /&gt;&lt;BR /&gt;
index_evt is for windows event logs&lt;BR /&gt;
index_perf contains all performance metrics &amp;amp; windows service information&lt;/P&gt;

&lt;P&gt;I want to create a search that&lt;BR /&gt;
 -  Searches index_perf (source=WMI:Services) for any service that contains "IBM" in the service name, that is "Stopped" and is also set to "Auto" for startup type within the past 2 hours. &lt;BR /&gt;
 -  Searches index_evt (sourcetype="WinEventLog:System") for system uptime is &amp;lt; 86400 seconds.&lt;/P&gt;

&lt;P&gt;We're looking for windows services that should be running after reboots of windows servers.  &lt;/P&gt;

&lt;P&gt;Your help is truly appreciated.  &lt;/P&gt;

&lt;P&gt;Thanks.  &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:32:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-schedule-search-and-alert-for-Windows-services-that-are/m-p/120016#M1808</guid>
      <dc:creator>agoktas</dc:creator>
      <dc:date>2020-09-28T17:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to schedule search and alert for Windows services that are "Stopped", set to "Auto" and system uptime is &lt; 86400 seconds</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-schedule-search-and-alert-for-Windows-services-that-are/m-p/120017#M1809</link>
      <description>&lt;P&gt;It would help to have the field names for these sources, but I will just make up field names...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=index_evt sourcetype="WinEventLog:System" uptime &amp;gt;=1800 uptime&amp;lt;=86400
| join host max=0 [ search index=index_perf source="WMI:Services" status=Stopped startup=Auto
                    | where match(service_name, "IBM") ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hopefully this is a good starting point...&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2014 22:41:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-schedule-search-and-alert-for-Windows-services-that-are/m-p/120017#M1809</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-09-10T22:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to schedule search and alert for Windows services that are "Stopped", set to "Auto" and system uptime is &lt; 86400 seconds</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-schedule-search-and-alert-for-Windows-services-that-are/m-p/120018#M1810</link>
      <description>&lt;P&gt;Thanks for your quick response lguinn!  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I get 0 results back.  &lt;/P&gt;

&lt;P&gt;One thing I had to do was: &lt;BR /&gt;
index=index_evt sourcetype="WinEventLog:System" | rex "The system uptime is (?&lt;UPTIME&gt;\d+) seconds." | Where uptime &amp;gt;=0 AND uptime&amp;lt;=86400&lt;/UPTIME&gt;&lt;/P&gt;

&lt;P&gt;But when appending the rest, I get nothing.  &lt;/P&gt;

&lt;P&gt;Full search:&lt;BR /&gt;&lt;BR /&gt;
index=index=evt sourcetype="WinEventLog:System" | rex "The system uptime is (?&lt;UPTIME&gt;\d+) seconds." | Where uptime &amp;gt;=0 AND uptime&amp;lt;=86400 | join host max=0 [ search index=index_perf source="WMI:Services" status=Stopped startup=Auto | where match(service_name, "IBM") ]&lt;/UPTIME&gt;&lt;/P&gt;

&lt;P&gt;Any other ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:33:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-schedule-search-and-alert-for-Windows-services-that-are/m-p/120018#M1810</guid>
      <dc:creator>agoktas</dc:creator>
      <dc:date>2020-09-28T17:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to schedule search and alert for Windows services that are "Stopped", set to "Auto" and system uptime is &lt; 86400 seconds</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-schedule-search-and-alert-for-Windows-services-that-are/m-p/120019#M1811</link>
      <description>&lt;P&gt;First, run the two searches separately? Do you get results? Do the results have a field named &lt;CODE&gt;host&lt;/CODE&gt;? Does the &lt;CODE&gt;host&lt;/CODE&gt; field have the same format, etc. and does it match across the two searches?&lt;/P&gt;

&lt;P&gt;Finally, is it possible that &lt;CODE&gt;0 results&lt;/CODE&gt; is the right answer?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 19:52:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-schedule-search-and-alert-for-Windows-services-that-are/m-p/120019#M1811</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-09-11T19:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to schedule search and alert for Windows services that are "Stopped", set to "Auto" and system uptime is &lt; 86400 seconds</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-schedule-search-and-alert-for-Windows-services-that-are/m-p/120020#M1812</link>
      <description>&lt;P&gt;Hi Iquinn, &lt;/P&gt;

&lt;P&gt;Sorry for the late reply.  &lt;/P&gt;

&lt;P&gt;I have done a search and successful results with the following two searches (separating both searches to verify they each work):&lt;BR /&gt;&lt;BR /&gt;
 - index=app_evtlogs sourcetype="WinEventLog:System" | rex "The system uptime is (?\d+) seconds." | Where uptime&amp;lt;=86400 &lt;BR /&gt;
 - index=app_perf source="WMI:Services" State=Stopped StartMode=Auto | rex field=_raw "\nName=(?PIBM.{1,})" | top SvcName by host&lt;/P&gt;

&lt;P&gt;But when I try to do a join: &lt;BR /&gt;
index=app_evtlogs sourcetype="WinEventLog:System" | rex "The system uptime is (?\d+) seconds." | Where uptime&amp;lt;=86400 | join host max=0 [ index=app_perf source="WMI:Services" State=Stopped StartMode=Auto | rex field=_raw "\nName=(?PIBM.{1,})" | top SvcName by host ]&lt;/P&gt;

&lt;P&gt;I get: &lt;BR /&gt;
Unknown search command 'index'.&lt;/P&gt;

&lt;P&gt;Any ideas as to what I'm missing or doing wrong?  &lt;/P&gt;

&lt;P&gt;Am I even able to do a 'join' with each search referencing a different index?  &lt;/P&gt;

&lt;P&gt;Thanks! &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:41:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-schedule-search-and-alert-for-Windows-services-that-are/m-p/120020#M1812</guid>
      <dc:creator>agoktas</dc:creator>
      <dc:date>2020-09-28T18:41:11Z</dc:date>
    </item>
  </channel>
</rss>

