<?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 collect Windows service status in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-collect-Windows-service-status/m-p/474058#M81411</link>
    <description>&lt;P&gt;I'm trying to collect the status of two windows services but I don't need the status of the rest of the services on the boxes. If I put in a WinHostMon stanza it collects everything but I can't seem to whitelist just the two I want. &lt;/P&gt;

&lt;P&gt;Is there an easy way to do this without creating a props and transform? &lt;BR /&gt;
I tried configuring at WMI stanza but I don't have something incorrect. &lt;BR /&gt;
See my example stanza below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WMI:Services]
interval = 300
disabled = 0
index = MyIndex
sourcetype = dwps-service
whitelist = "service1"
whitelist1 = "service2"
wql = select Name, DisplayName, State, Status, StartName FROM Win32_Service
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 31 Oct 2019 22:04:33 GMT</pubDate>
    <dc:creator>morphis72</dc:creator>
    <dc:date>2019-10-31T22:04:33Z</dc:date>
    <item>
      <title>How to collect Windows service status</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-collect-Windows-service-status/m-p/474058#M81411</link>
      <description>&lt;P&gt;I'm trying to collect the status of two windows services but I don't need the status of the rest of the services on the boxes. If I put in a WinHostMon stanza it collects everything but I can't seem to whitelist just the two I want. &lt;/P&gt;

&lt;P&gt;Is there an easy way to do this without creating a props and transform? &lt;BR /&gt;
I tried configuring at WMI stanza but I don't have something incorrect. &lt;BR /&gt;
See my example stanza below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WMI:Services]
interval = 300
disabled = 0
index = MyIndex
sourcetype = dwps-service
whitelist = "service1"
whitelist1 = "service2"
wql = select Name, DisplayName, State, Status, StartName FROM Win32_Service
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Oct 2019 22:04:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-collect-Windows-service-status/m-p/474058#M81411</guid>
      <dc:creator>morphis72</dc:creator>
      <dc:date>2019-10-31T22:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to collect Windows service status</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-collect-Windows-service-status/m-p/474059#M81412</link>
      <description>&lt;P&gt;Greetings @morphis72,&lt;/P&gt;

&lt;P&gt;I would just grab all the services and filter within Splunk.&lt;/P&gt;

&lt;P&gt;If you really don't want to go that route, you should be able to do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [WMI:Services]
 interval = 300
 disabled = 0
 index = MyIndex
 sourcetype = dwps-service
 wql = select Name, DisplayName, State, Status, StartName FROM Win32_Service WHERE Name = "service1" OR  Name = "service2"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See here for everything you can do with WMI querying: &lt;A href="https://www.darkoperator.com/blog/2013/3/11/introduction-to-wmi-basics-with-powershell-part-3-wql-and-se.html"&gt;https://www.darkoperator.com/blog/2013/3/11/introduction-to-wmi-basics-with-powershell-part-3-wql-and-se.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
Jacob&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 22:33:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-collect-Windows-service-status/m-p/474059#M81412</guid>
      <dc:creator>jacobpevans</dc:creator>
      <dc:date>2019-10-31T22:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to collect Windows service status</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-collect-Windows-service-status/m-p/474060#M81413</link>
      <description>&lt;P&gt;Hi Jacob,&lt;/P&gt;

&lt;P&gt;Thanks for the response. I tried the above stanza with my two service names I'm shooting for but didn't get anything back. &lt;/P&gt;

&lt;P&gt;This is what the event looks like when I pull it in with WinHostMon and for the in the wql statment above I'm using name = "Blue Prism Server"&lt;/P&gt;

&lt;P&gt;Type=Service&lt;BR /&gt;
Name="Blue Prism Server"&lt;BR /&gt;
DisplayName="Blue Prism Server"&lt;BR /&gt;
Description="The Blue Prism Server Service"&lt;BR /&gt;
Path="C:\Program Files\Blue Prism Limited\Blue Prism Automate\BPServerService.exe"&lt;BR /&gt;
ServiceType="Own Process"&lt;BR /&gt;
StartMode="Manual"&lt;BR /&gt;
Started=false&lt;BR /&gt;
State="Stopped"&lt;BR /&gt;
Status="OK"&lt;BR /&gt;
ProcessId=0&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 14:49:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-collect-Windows-service-status/m-p/474060#M81413</guid>
      <dc:creator>morphis72</dc:creator>
      <dc:date>2019-11-01T14:49:17Z</dc:date>
    </item>
  </channel>
</rss>

