9 Discovery of Windows performance counter instances

Overview

It is possible to discover object instances of Windows performance counters. This is useful for multi-instance performance counters.

Item key

The item to use in the discovery rule is

perf_instance.discovery[object]

or, to be able to provide the object name in English only, independently of OS localization:

perf_instance_en.discovery[object]

For example:

perf_instance.discovery[Processador]
       perf_instance_en.discovery[Processor]

These items are supported since Zabbix Windows agent 5.0.1.

Supported macros

The discovery will return all instances of the specified object in the {#INSTANCE} macro, which may be used in the prototypes of perf_counter and perf_counter_en items.

[
           {"{#INSTANCE}":"0"},
           {"{#INSTANCE}":"1"},
           {"{#INSTANCE}":"_Total"}
       ]

For example, if the item key used in the discovery rule is:

perf_instance.discovery[Processor]

you may create an item prototype:

perf_counter["\Processor({#INSTANCE})\% Processor Time"]

Notes:

  • If the specified object is not found or does not support variable instances then the discovery item will become NOTSUPPORTED.
  • If the specified object supports variable instances, but currently does not have any instances, then an empty JSON array will be returned.
  • In case of duplicate instances they will be skipped.