文档文档

Windows Services 输入插件

此插件收集有关 Windows 服务状态的信息。

监视某些服务可能需要以管理员权限运行 Telegraf。

引入于: Telegraf v1.4.0 标签: system 操作系统支持: windows

全局配置选项

插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md

配置

# 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)

state 字段可以具有以下值

  • 1 - stopped (停止)
  • 2 - start pending (启动中)
  • 3 - stop pending (停止中)
  • 4 - running (运行中)
  • 5 - continue pending (继续中)
  • 6 - pause pending (暂停中)
  • 7 - paused (已暂停)

startup_mode 字段可以具有以下值

  • 0 - boot start (启动时启动)
  • 1 - system start (系统启动时启动)
  • 2 - auto start (自动启动)
  • 3 - demand start (按需启动)
  • 4 - disabled (禁用)

示例输出

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

此页面是否有帮助?

感谢您的反馈!


InfluxDB 3.8 新特性

InfluxDB 3.8 和 InfluxDB 3 Explorer 1.6 的主要增强功能。

查看博客文章

InfluxDB 3.8 现已适用于 Core 和 Enterprise 版本,同时发布了 InfluxDB 3 Explorer UI 的 1.6 版本。本次发布着重于操作成熟度,以及如何更轻松地部署、管理和可靠地运行 InfluxDB。

更多信息,请查看

InfluxDB Docker 的 latest 标签将指向 InfluxDB 3 Core

在 **2026 年 2 月 3 日**,InfluxDB Docker 镜像的 latest 标签将指向 InfluxDB 3 Core。为避免意外升级,请在您的 Docker 部署中使用特定的版本标签。

如果使用 Docker 来安装和运行 InfluxDB,latest 标签将指向 InfluxDB 3 Core。为避免意外升级,请在您的 Docker 部署中使用特定的版本标签。例如,如果使用 Docker 运行 InfluxDB v2,请将 latest 版本标签替换为 Docker pull 命令中的特定版本标签 — 例如

docker pull influxdb:2