title: Check Windows services
agents: windows
author: Mathias Kettner <mk@mathias-kettner.de>
license: GPL
distribution: check_mk
description:
 Check the current state of an operating system or application
 service. Currently only the Windows agent provides this information.
 Each service is usually either {running} or {stopped}. Intermediate
 states are {starting} and {stopping} and are only transient. 
 This check gets critical if the service in question is not in 
 the state {running} or is missing on the system at all.

item:
 The name of the service as string. Please note, that the agent replaces
 spaces in the service names with underscores. If you are unsure
 about the correct spelling of the name then please look at the
 output of the agent. The service names are in the first column
 of the section {<<<services>>>}.

inventory:
 This check supports inventory. Because you surely won't want
 to monitor {all} running services, you have to define a list of
 potentially interesting services. This is done by listing them
 in the configuration variable
 {inventory_services}, which is a list of strings.
 All services found in state {running} on
 a target host during inventory will be added to your monitoring.
 You may combine this with additional manual checks of further 
 services.

examples:
 # inventory should add monitoring of the following services
 # if found running on target machine:
 inventory_services = [ "MySQL_Server", "TSMMgR", "McEfieUpdater" ]

 # check for further non-inventorized services
 checks += [
  # make sure, that service "cimlistener" is running on all hosts
  # with the tag "win"
  ( ["win"], ALL_HOSTS, "services", "cimlistener", None ),
  # The service "Apache" should is monitored only on two specific hosts
  ( ["websrv01", "websrv02"], "services", "Apache", None ),
 ]

[configuration]
inventory_services (list of strings): List of service names. If inventory
 finds one of those services running on a target machine it will add 
 it to your monitoring.

