Docs » Splunk Observability Cloud でサポートされているインテグレーション » Collectorコンポーネント: レシーバー » Windowsパフォーマンス・カウンターレシーバー

Windowsパフォーマンス・カウンターレシーバー 🔗

Windows Performance Counters レシーバーを使用すると、Splunk Distribution of OpenTelemetry Collector で、設定されたシステム、アプリケーション、またはカスタムのパフォーマンス・カウンターデータを Windows レジストリから収集できます。サポートされているパイプラインタイプは metrics です。詳細は パイプラインでデータを処理する を参照してください。

設定されたメトリクスは、レシーバーによってスクレイピングされた 1つまたは複数のパフォーマンス・カウンターによって使用される、単位とタイプを含むメトリクスの説明で構成されます。起動時に特定のパフォーマンス・カウンターにアクセスできない場合、レシーバーは警告を発し、実行を続行します。

Windowsパフォーマンス・カウンター・レシーバーは、同名のSmartAgentモニタータイプを置き換えます。モニタータイプについては、Windowsパフォーマンス・カウンター を参照してください。

注釈

Windowsパフォーマンス・カウンター・レシーバーはWindowsホストでのみ動作します。

はじめに 🔗

以下の手順に従って、コンポーネントの設定とアクティベーションを行ってください:

  1. Splunk Distribution of OpenTelemetry Collector をホストまたはコンテナプラットフォームにデプロイします:

  2. 次のセクションで説明するように、Windowsパフォーマンス・カウンター・レシーバーを設定します。

  3. Collector を再起動します。

利用可能なパフォーマンス・カウンターを見る 🔗

利用可能なパフォーマンス・カウンターのリストを見るには、Windows PowerShellまたはWindowsパフォーマンスモニターを使用します。

PowerShellで以下のコマンドを実行し、すべてのパフォーマンス・カウンターセットをリストします:

Get-Counter -ListSet *

各パフォーマンス・カウンターセットのインスタンスを一覧表示するには、以下のコマンドを実行し、<perf_object_name> を検索したいインスタンス名に置き換えます:

Get-Counter -List "<perf_object_name>"

サンプル構成 🔗

Windows Performance Counters レシーバーをアクティブにするには、Collector 構成ファイルの 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 セクションの metrics パイプラインに、レシーバーを含めます。例:

service:
  pipelines:
    metrics:
      receivers:
        - windowsperfcounters

Windows パフォーマンス・カウンターからメトリクスを収集するには、例のように metrics フィールドを使用してメトリクスを定義する必要があります。その後、counters.metric フィールドから定義したメトリクスを参照できます。

メトリクス形式 🔗

特定の形式でメトリクスを報告するには、メトリクスを定義し、該当する属性とともに、対応するカウンターでそれを参照します。デフォルトでは、メトリクス名はカウンターの名前に対応します。

メトリクスは、sum または gauge のタイプが可能です。Sum メトリクスは、aggregationmonotonic フィールドをサポートします。

フィールド

説明

デフォルト

name

メトリクスのキーまたは名前。空でない文字列。

文字列

カウンターの名前

description

メトリクスまたは測定の説明

文字列

unit

測定単位

文字列

1

sum

合計メトリクスの表現

合計設定

gauge

ゲージメトリクスの表現

ゲージ設定

以下の設定は、合計メトリクスに適用されます:

フィールド

説明

デフォルト

aggregation

メトリクスの集計の一時性のタイプ

cumulative または delta

monotonic

メトリクス値が減少するかどうか

false

以下の設定は、ゲージメトリクスに適用されます:

gauge コンフィギュレーションは設定を受け付けません。次の例は、Memory/Committed Bytes カウンターを 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

service:
  pipelines:
    metrics:
      receivers: [windowsperfcounters]

収集間隔とカウンターを設定する 🔗

収集間隔とスクレイピングするパフォーマンス・カウンターを設定できます。例:

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>

異なる収集間隔でスクレイプする 🔗

以下の例は、ターゲットによって異なる収集間隔を使用してパフォーマンス・カウンターをスクレイピングする方法を示しています:

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]

インスタンスの構成 🔗

An instance is any entity that produces performance data. Instances can have 1 or more counter values.

レシーバーは instances フィールドを通じて以下の値をサポートします:

解釈

"*"

すべてのインスタンス

"_Total"

The aggregate of all other instance values, which is itself an instance. For more information, see _Total instance behavior and the aggregation counter.

"instance1"

シングルインスタンス

["instance1", "instance2", ...]

インスタンスのセット

["_Total", "instance1", "instance2", ...]

総インスタンスを含むインスタンスのセット

_Total instance behavior and the aggregation counter 🔗

To avoid dropping the _Total instance, you must configure the receiver to collect it individually on its own metric.

例:

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

警告

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.

既知の制限 🔗

コンテナ内でCollectorを実行すると、Network Interfaceオブジェクトからのメトリクスが生成されません。これは、ネットワーク・インターフェイスがコンテナ内で使用できないことが原因です。ネットワーク・インターフェイスのメトリクスはサブプロセスに対して取得されます。

設定 🔗

以下の表は、Windows パフォーマンス・カウンター・レシーバーの構成オプションを示します:

トラブルシューティング 🔗

Splunk Observability Cloudをご利用のお客様で、Splunk Observability Cloudでデータを確認できない場合は、以下の方法でサポートを受けることができます。

Splunk Observability Cloudをご利用のお客様

見込み客および無料トライアルユーザー様

  • Splunk Answers のコミュニティサポートで質問し、回答を得る

  • Splunk #observability ユーザーグループの Slack チャンネルに参加して、世界中の顧客、パートナー、Splunk 社員とのコミュニケーションを図る。参加するには、Get Started with Splunk Community マニュアルの チャットグループ を参照してください。

This page was last updated on 2024年06月24日.