In a similar way as file systems are discovered, it is possible to also discover Windows services.
The item to use in the discovery rule is
The following macros are supported for use in the discovery rule filter and prototypes of items, triggers and graphs:
Macro | Description |
---|---|
{#SERVICE.NAME} | Service name. |
{#SERVICE.DISPLAYNAME} | Displayed service name. |
{#SERVICE.DESCRIPTION} | Service description. |
{#SERVICE.STATE} | Numerical value of the service state. See the service.info item for details. |
{#SERVICE.STATENAME} | Name of the service state. See the service.info item for details. |
{#SERVICE.PATH} | Service path. |
{#SERVICE.USER} | Service user. |
{#SERVICE.STARTUP} | Numerical value of the service startup type. See the service.info item for details. |
{#SERVICE.STARTUPNAME} | Name of the service startup type. See the service.info item for details. |
{#SERVICE.STARTUPTRIGGER} | Numerical value to indicate if the service startup type has: 0 - no startup triggers 1 - has startup triggers 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
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.