Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gdi/monitors-prometheus/prometheus-node.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ The following table shows the configuration options for the
Metrics
-------

The following metrics are available for this integration:
The following metrics are available for this integration. All metrics are custom.

.. raw:: html

Expand Down
235 changes: 117 additions & 118 deletions gdi/opentelemetry/components/windowsperfcounters-receiver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The Windows Performance Counters receiver allows the Splunk Distribution of the

.. note:: The Windows Performance Counters receiver only works on Windows hosts.

The Windows Performance Counters receiver replaces the SmartAgent monitor type :ref:`telegraf-win-perf-counters`. It's based on the :new-page:`Telegraf Windows Performance Counters Input Plugin <https://github.com/influxdata/telegraf/tree/master/plugins/inputs/win_perf_counters>` and uses the :new-page:`PDH interface <https://learn.microsoft.com/en-us/windows/win32/perfctrs/using-the-pdh-functions-to-consume-counter-data>`.
The Windows Performance Counters receiver replaces the Smart Agent monitor :ref:`telegraf-win-perf-counters`. It's based on the :new-page:`Telegraf Windows Performance Counters Input Plugin <https://github.com/influxdata/telegraf/tree/master/plugins/inputs/win_perf_counters>` and uses the :new-page:`PDH interface <https://learn.microsoft.com/en-us/windows/win32/perfctrs/using-the-pdh-functions-to-consume-counter-data>`.

Get started
======================
Expand All @@ -29,29 +29,29 @@ To activate the Windows Performance Counters receiver add a ``windowsperfcounter

.. code-block:: yaml

receivers:
windowsperfcounters:
metrics:
bytes.committed:
description: the number of bytes committed to memory
unit: By
gauge:
collection_interval: 30s
perfcounters:
- object: Memory
counters:
- name: Committed Bytes
metric: bytes.committed
receivers:
windowsperfcounters:
metrics:
bytes.committed:
description: the number of bytes committed to memory
unit: By
gauge:
collection_interval: 30s
perfcounters:
- object: Memory
counters:
- name: Committed Bytes
metric: bytes.committed

To complete the configuration, include the receiver in the ``metrics`` pipeline of the ``service`` section of your configuration file:

.. code-block:: yaml

service:
pipelines:
metrics:
receivers:
- windowsperfcounters
service:
pipelines:
metrics:
receivers:
- windowsperfcounters

To collect metrics from Windows performance counters, you need to define metrics using the ``metrics`` field as in the example. You can then reference the metrics you defined from the ``counters.metric`` fields.

Expand Down Expand Up @@ -106,29 +106,29 @@ You can configure the collection interval and which performance counters you wan

.. code-block:: yaml

windowsperfcounters:
collection_interval: <duration>
initial_delay: <duration>
metrics:
<metric name 1>:
description: <description>
unit: <unit type>
gauge: null
<metric name 2>:
description: <description>
unit: <unit type>
sum: null
aggregation: <cumulative or delta>
monotonic: <true or false>
perfcounters:
- object: <object name>
instances:
- <instance name>
counters:
- name: <counter name>
metric: <metric name>
attributes:
<key>: <value>
windowsperfcounters:
collection_interval: <duration>
initial_delay: <duration>
metrics:
<metric name 1>:
description: <description>
unit: <unit type>
gauge: null
<metric name 2>:
description: <description>
unit: <unit type>
sum: null
aggregation: <cumulative or delta>
monotonic: <true or false>
perfcounters:
- object: <object name>
instances:
- <instance name>
counters:
- name: <counter name>
metric: <metric name>
attributes:
<key>: <value>

Scrape at different collection intervals
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -137,50 +137,49 @@ The following example shows how to scrape performance counters using different c

.. code-block:: yaml

receivers:
windowsperfcounters/memory:
metrics:
bytes.committed:
description: Number of bytes committed to memory
unit: By
gauge:
collection_interval: 30s
perfcounters:
- object: Memory
counters:
- name: Committed Bytes
metric: bytes.committed

receivers:
windowsperfcounters/memory:
metrics:
bytes.committed:
description: Number of bytes committed to memory
unit: By
gauge:
collection_interval: 30s
perfcounters:
- object: Memory
counters:
- name: Committed Bytes
metric: bytes.committed

windowsperfcounters/processor:
collection_interval: 1m
metrics:
processor.time:
description: CPU active and idle time
unit: "%"
gauge:
perfcounters:
- object: "Processor"
instances: "*"
counters:
- name: "% Processor Time"
metric: processor.time
attributes:
state: active
- object: "Processor"
instances: [1, 2]
counters:
- name: "% Idle Time"
metric: processor.time
attributes:
state: idle

# ...

service:
pipelines:
metrics:
receivers: [windowsperfcounters/memory, windowsperfcounters/processor]
windowsperfcounters/processor:
collection_interval: 1m
metrics:
processor.time:
description: CPU active and idle time
unit: "%"
gauge:
perfcounters:
- object: "Processor"
instances: "*"
counters:
- name: "% Processor Time"
metric: processor.time
attributes:
state: active
- object: "Processor"
instances: [1, 2]
counters:
- name: "% Idle Time"
metric: processor.time
attributes:
state: idle

# ...

service:
pipelines:
metrics:
receivers: [windowsperfcounters/memory, windowsperfcounters/processor]

Configure instances
---------------------------------
Expand Down Expand Up @@ -218,24 +217,24 @@ To avoid dropping the ``_Total`` instance, configure the receiver to collect it

.. code-block:: yaml

windowsperfcounters:
metrics:
processor.time.total:
description: Total CPU active and idle time
unit: "%"
gauge:
collection_interval: 30s
perfcounters:
- object: "Processor"
instances:
- "_Total"
counters:
- name: "% Processor Time"
metric: processor.time.total
windowsperfcounters:
metrics:
processor.time.total:
description: Total CPU active and idle time
unit: "%"
gauge:
collection_interval: 30s
perfcounters:
- object: "Processor"
instances:
- "_Total"
counters:
- name: "% Processor Time"
metric: processor.time.total

.. warning::

When using an ``instance`` value of ``"*"``, if the counter uses a value other than ``_Total``, make sure to avoid double counting when aggregating metrics after the receiver scrapes them.
When using an ``instance`` value of ``"*"``, if the counter uses a value other than ``_Total``, make sure to avoid double counting when aggregating metrics after the receiver scrapes them.

Recreate the query on every scrape
--------------------------------------------
Expand Down Expand Up @@ -330,24 +329,24 @@ The following example emits the ``Memory/Committed Bytes`` counter as the ``byte

.. code:: yaml

receivers:
windowsperfcounters:
metrics:
bytes.committed:
description: the number of bytes committed to memory
unit: By
gauge:
collection_interval: 30s
perfcounters:
- object: Memory
counters:
- name: Committed Bytes
metric: bytes.committed

service:
pipelines:
metrics:
receivers: [windowsperfcounters]
receivers:
windowsperfcounters:
metrics:
bytes.committed:
description: the number of bytes committed to memory
unit: By
gauge:
collection_interval: 30s
perfcounters:
- object: Memory
counters:
- name: Committed Bytes
metric: bytes.committed

service:
pipelines:
metrics:
receivers: [windowsperfcounters]

Known limitations
======================
Expand Down
Loading