Documentation

Windows Services Input Plugin

This plugin collects information about the status of Windows services.

Monitoring some services may require running Telegraf with administrator privileges.

Introduced in: Telegraf v1.4.0 Tags: system OS support: windows

Global configuration options

In addition to the plugin-specific configuration settings, plugins support additional global and plugin configuration settings. These settings are used to modify metrics, tags, and field or create aliases and configure ordering, etc. See the CONFIGURATION.md for more details.

Configuration

# Input plugin to report Windows services info.
# This plugin ONLY supports Windows
[[inputs.win_services]]
  ## Names of the services to monitor. Leave empty to monitor all the available
  ## services on the host. Globs accepted. Case insensitive.
  service_names = [
    "LanmanServer",
    "TermService",
    "Win*",
  ]

  # optional, list of service names to exclude
  excluded_service_names = ['WinRM']

Metrics

  • win_services
    • tags
      • service_name
      • display_name
    • fields
      • state (integer)
      • startup_mode (integer)

The state field can have the following values:

  • 1 - stopped
  • 2 - start pending
  • 3 - stop pending
  • 4 - running
  • 5 - continue pending
  • 6 - pause pending
  • 7 - paused

The startup_mode field can have the following values:

  • 0 - boot start
  • 1 - system start
  • 2 - auto start
  • 3 - demand start
  • 4 - disabled

Example Output

win_services,host=WIN2008R2H401,display_name=Server,service_name=LanmanServer state=4i,startup_mode=2i 1500040669000000000
win_services,display_name=Remote\ Desktop\ Services,service_name=TermService,host=WIN2008R2H401 state=1i,startup_mode=3i 1500040669000000000

Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

New in InfluxDB 3.4

Key enhancements in InfluxDB 3.4 and the InfluxDB 3 Explorer 1.2.

See the Blog Post

InfluxDB 3.4 is now available for both Core and Enterprise, which introduces offline token generation for use in automated deployments and configurable license type selection that lets you bypass the interactive license prompt. InfluxDB 3 Explorer 1.2 is also available, which includes InfluxDB cache management and other new features.

For more information, check out: