Zabbix Documentation 4.0

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


Sidebar

zh:manual:discovery:low_level_discovery:windows_services

6 Windows发现服务

概述

与发现文件系统的方式相似,同样可以以此Windows发现服务。

键值

发现规则 中使用的监控项是

service.discovery

此监控项从Zabbix Windows agent 3.0开始支持。

支持宏

支持在发现规则过滤器,以及监控项,触发器和图表原型中使用以下宏:

描述
{#SERVICE.NAME} 服务名称
{#SERVICE.DISPLAYNAME} 展示中的服务名称
{#SERVICE.DESCRIPTION} 服务描述
{#SERVICE.STATE} 服务状态数值:
0 - 运行中
1 - 暂停
2 - 开始待定
3 - 暂停待定
4 - 继续待定
5 - 停止待定
6 - 停止
7 - 未知
{#SERVICE.STATENAME} 服务状态名称 (运行, 暂停, 开始待定, 暂停待定, 继续待定, 停止待定, 停止未知).
{#SERVICE.PATH} 服务路径
{#SERVICE.USER} 服务用户
{#SERVICE.STARTUP} 服务启动类型数值:
0 - 自动
1 - 自动延迟
2 - 手动
3 - 禁用
4 - 未知
{#SERVICE.STARTUPNAME} 服务启动类型名称 (自动, 自动延迟, 手动, 禁用, 未知).
{#SERVICE.STARTUPTRIGGER} 用于指示服务启动类型是否具有以下内容的数值:
0 - 没有启动触发器
1 - 已启动触发器
此宏从Zabbix 3.4.4开始支持。发现诸如自动(触发器启动)自动延迟(触发器启动)和手动(触发器启动)等服务启动类型非常有用。

基于Windows发现服务,你可以创建一个监控项原型,如:

service.info[{#SERVICE.NAME},<param>]

其中 param 接受以下值: state, displayname, path, user, startupdescription.

例如,要获取服务的显示名称,你可以使用“service.info[{#SERVICE.NAME},displayname]” 的监控项。如果未指定 param 值 (“service.info[{#SERVICE.NAME}]”) ,则使用默认state参数。

6 Discovery of Windows services

Overview

In a similar way as file systems are discovered, it is possible to also discover Windows services.

Item key

The item to use in the discovery rule is

service.discovery

This item is supported since Zabbix Windows agent 3.0.

Supported macros

The following macros are supported for use in the discovery rule filter and prototypes of items, triggers and graphs:

MacroDescription
{#SERVICE.NAME} Service name.
{#SERVICE.DISPLAYNAME} Displayed service name.
{#SERVICE.DESCRIPTION} Service description.
{#SERVICE.STATE} Numerical value of the service state:
0 - Running
1 - Paused
2 - Start pending
3 - Pause pending
4 - Continue pending
5 - Stop pending
6 - Stopped
7 - Unknown
{#SERVICE.STATENAME} Name of the service state (Running, Paused, Start pending, Pause pending, Continue pending, Stop pending, Stopped or Unknown).
{#SERVICE.PATH} Service path.
{#SERVICE.USER} Service user.
{#SERVICE.STARTUP} Numerical value of the service startup type:
0 - Automatic
1 - Automatic delayed
2 - Manual
3 - Disabled
4 - Unknown
{#SERVICE.STARTUPNAME} Name of the service startup type (Automatic, Automatic delayed, Manual, Disabled, Unknown).
{#SERVICE.STARTUPTRIGGER} Numerical value to indicate if the service startup type has:
0 - no startup triggers
1 - has startup triggers
This macro is supported since Zabbix 3.4.4. It is useful to discover such service startup types as Automatic (trigger start), Automatic delayed (trigger start) and Manual (trigger start).

Based on Windows service discovery you may create an item prototype like

service.info[{#SERVICE.NAME},<param>]

where param accepts the following values: state, displayname, path, user, startup or description.

For example, to acquire the display name of a service you may use a “service.info[{#SERVICE.NAME},displayname]” item. If param value is not specified (“service.info[{#SERVICE.NAME}]”), the default state parameter is used.