ホスト・メトリクス・レシーバー

Splunk Observability Cloud インテグレーションをホストメトリクスモニターに使用します。メリット、インストール、設定、メトリクスを参照してください

ホストメトリクスレシーバは、Collector がエージェントとしてデプロイされたときに、ホストシステムからスクレイピングされたメトリクスを生成します。サポートされているパイプラインのタイプは metrics です。

デフォルトでは、Splunk Distribution of OpenTelemetry Collector でホストメトリクスレシーバーが有効化され、以下のメトリクスを収集します:

  • システム・メトリクス

  • CPU使用率メトリクス

  • ディスクI/Oメトリクス

  • CPU負荷メトリクス

  • ファイル・システム使用量メトリクス

  • メモリ使用量メトリクス

  • ネットワーク・インターフェイスとTCPコネクション・メトリクス

  • プロセス・カウント・メトリクス(Linuxのみ)

Infrastructure Monitoring 上にホストレシーバメトリクスが表示されます。これをもとにダッシュボードとアラートを作成できます。詳しくは「アラートをトリガーするディテクタの作成」をご確認ください。

注意: SignalFx エクスポータは、デフォルトでいくつかの利用可能なメトリクスを除外します。デフォルトのメトリクスフィルタの詳細については、「List of metrics excluded by default」を参照してください。除外されたメトリクスの最新リストは、GitHub にあります。https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/signalfxexporter/internal/translation/default_metrics.go#L49 を参照してください。

はじめに

注: このコンポーネントは、ホスト監視(エージェント)モードでデプロイする場合、Splunk Distribution of the OpenTelemetry Collector のデフォルト設定に含まれます。詳細については、「Collector deployment modes」を参照してください。デフォルト設定について詳しくは「Helm で Collector for Kubernetes を設定する」、「Collector for Linux のデフォルト設定」、または「Collector for Windows のデフォルト設定」を参照してください。このドキュメントで説明されているように、いつでも設定をカスタマイズできます。

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

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

  2. 次のセクションで説明するようにレシーバーを設定します。

  3. Collector を再起動します。

注: Splunk Observability Cloud に取り込まれるデータにはシステム制限があります。詳しくは「Splunk Observability Cloud の製品別のシステム制限」を参照してください。

コンテナ・ホストのメトリクスを収集する(Linux)

ホストメトリクスレシーバは、Linux システムディレクトリからメトリクスを収集します。コンテナではなくホストのメトリクスを収集するには、次の手順に従います。

  1. コンテナを実行するときに、ホストファイルシステム全体をマウントします。次に例を示します。docker run -v /:/hostfs ホストファイルシステムのどの部分をマウントするか選択することもできます。例: docker run -v /proc:/hostfs/proc

  2. root_path を設定して、ホストメトリクスレシーバがルートファイルシステムの場所を認識できるようにします。例:

    YAML
    receivers:
    hostmetrics:
       root_path: /hostfs

    ホスト・メトリクス・レシーバーの複数のインスタンスを実行している場合は、すべてのインスタンスに同じ root_path を設定します。

サンプル構成

次の例に示すように、収集間隔とスクレイピングするメトリクスのカテゴリを構成できます:

YAML
hostmetrics:
  collection_interval: <duration> # The default is 1m.
  scrapers:
    <scraper1>:
    <scraper2>:
    ...

スクレーパはエンドポイントからデータを抽出し、そのデータを指定されたターゲットに送信します。利用可能なスクレーパを以下の表に記載します。

Scraper

説明

system

システム・メトリクス

cpu

CPU使用率メトリクス

disk

ディスクI/Oメトリクス

load

CPU負荷メトリクス

filesystem

ファイル・システム利用率メトリクス

memory

メモリ利用率メトリクス

network

ネットワーク・インターフェイスのI/OメトリクスとTCPコネクション・メトリクス

paging

ページングまたはスワップ領域の使用率とI/Oメトリクス

processes

プロセスカウントメトリクス。Linux でのみ使用可能です。

process

プロセスごとのCPU、メモリ、ディスクI/Oメトリクス

スクレーパーの構成については、以下のセクションを参照してください。

ディスク

YAML
disk:
  <include|exclude>:
    devices: [ <device name>, ... ]
    match_type: <strict|regexp>

ファイルシステム

YAML
filesystem:
  <include_devices|exclude_devices>:
    devices: [ <device name>, ... ]
    match_type: <strict|regexp>
  <include_fs_types|exclude_fs_types>:
    fs_types: [ <filesystem type>, ... ]
    match_type: <strict|regexp>
  <include_mount_points|exclude_mount_points>:
    mount_points: [ <mount point>, ... ]
    match_type: <strict|regexp>

以下の例では、Linuxシステムの一般的なマウント・ポイントとして、フォワード・スラッシュ( / )を使用しています:

YAML
filesystem:
  include_mount_points:
    mount_points: ["/"]
    match_type: strict

同様に、以下の例では、Windowsシステムの一般的なマウントポイントとして C: を示しています:

YAML
filesystem:
  include_mount_points:
    mount_points: ["C:"]
    match_type: strict

仮想ファイルシステムを含めるには、include_virtual_filesystemstrue に設定します。

YAML
filesystem:
  include_virtual_filesystems: true

GitHubのdaemonset.yamlファイルに、より多くの例があります。

ネットワーク

YAML
network:
  <include|exclude>:
    interfaces: [ <interface name>, ... ]
    match_type: <strict|regexp>

プロセス

YAML
process:
  <include|exclude>:
    names: [ <process name>, ... ]
    match_type: <strict|regexp>
  mute_process_name_error: <true|false>
  mute_process_exe_error: <true|false>
  mute_process_io_error: <true|false>
  scrape_process_delay: <time>

以下の例では、デフォルトに加えて2つのメトリクスを収集し、リソース属性を使用して収集データにプロセスオーナを含めるプロセススクレーパーの設定方法を示します:

YAML
receivers:
  hostmetrics:
    scrapers:
      process:
        resource_attributes:
          process.owner:
            enabled: true
        metrics:
          process.memory.usage:
            enabled: true
          process.disk.io:
            enabled: true

プロセススクレーパを使用したメトリクスとリソース属性の有効化と無効化の詳細については、OpenTelemetry ドキュメントの hostmetricsreceiver/process を参照してください。

プロセスの読み取りに関するエラーが継続的に表示される場合は、mute_process_name_errormute_process_exe_error、または mute_process_io_errortrue に設定することを検討してください。

フィルターリング

特定のソースからのメトリクスのサブセットのみを収集するには、filter プロセッサーでホスト・メトリクス・レシーバーを使用します。

さまざまな頻度

あるメトリクスを他のメトリクスとは異なる頻度でスクレイピングするには、異なる collection_interval 値で複数のホストメトリクスレシーバを構成してください。例:

YAML
receivers:
  hostmetrics:
    collection_interval: 30s
    scrapers:
      cpu:
      memory:

  hostmetrics/disk:
    collection_interval: 1m
    scrapers:
      disk:
      filesystem:

service:
  pipelines:
    metrics:
      receivers: [hostmetrics, hostmetrics/disk]

メトリクス

以下のメトリクス、リソース属性、および属性が使用できます。

注: SignalFx エクスポータは、デフォルトでいくつかの利用可能なメトリクスを除外します。デフォルトのメトリクスフィルタの詳細については、「List of metrics excluded by default」を参照してください。

CPUスクレーパー

同梱

https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/cpuscraper.yaml

詳しくは、GitHub の「cpu scraper documentation」を参照してください。

ディスクスクレーパー

同梱

https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/diskscraper.yaml

詳細については、GitHub の「disk scraper documentation」を参照してください。

ファイルシステムスクレーパー

同梱

https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/filesystemscraper.yaml

詳細については、GitHub の「filesystem scraper documentation」を参照してください。

ロードスクレーパー

同梱

https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/loadscraper.yaml

詳細については、GitHub の「load scraper documentation」を参照してください。

メモリスクレーパー

同梱

https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/memoryscraper.yaml

詳細については、GitHub の「memory scraper documentation」を参照してください。

ネットワークスクレーパー

同梱

https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/networkscraper.yaml

詳細については、GitHub の「network scraper documentation」を参照してください。

ページングスクレーパー

同梱

https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/pagingscraper.yaml

詳細については、GitHub の「paging scraper documentation」を参照してください。

プロセススクレーパー

同梱

https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/processscraper.yaml

詳細については、GitHub の「process scraper documentation」を参照してください。

プロセススクレーパー

同梱

https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/processesscraper.yaml

詳細については、GitHub の「processes scraper documentation」を参照してください。

デフォルトの変換ルールと生成されたメトリクス

SignalFx エクスポータは、デフォルトで translation/constants.go で定義された変換ルールを使用します。

デフォルトのルールは、Infrastructure Monitoring に直接レポートされるメトリクスを作成します。その属性または値を変更する場合は、変換ルールまたはその構成要素であるホストのメトリクスを変更する必要があります。

デフォルトでは、SignalFx エクスポータは、ホストメトリクスレシーバーから以下の集約メトリクスを作成します。

  • cpu.idle

  • cpu.interrupt

  • cpu.nice

  • cpu.num_processors

  • cpu.softirq

  • cpu.steal

  • cpu.system

  • cpu.user

  • cpu.utilization

  • cpu.utilization_per_core

  • cpu.wait

  • disk.summary_utilization

  • disk.utilization

  • disk_ops.pending

  • disk_ops.total

  • memory.total

  • memory.utilization

  • network.total

  • process.cpu_time_seconds

  • system.disk.io.total

  • system.disk.operations.total

  • system.network.io.total

  • system.network.packets.total

  • vmpage_io.memory.in

  • vmpage_io.memory.out

  • vmpage_io.swap.in

  • vmpage_io.swap.out

集約されたメトリクスに加えて、デフォルトのルールでは、以下の「コアごとの」カスタムホストメトリクスが利用可能です。CPU 番号はディメンション cpu に割り当てられます。

  • cpu.interrupt

  • cpu.nice

  • cpu.softirq

  • cpu.steal

  • cpu.system

  • cpu.user

  • cpu.wait

リソース属性

ホストメトリクスレシーバーは、エクスポートされたメトリクスにリソース属性を設定しません。

リソース属性を設定するには、OTEL_RESOURCE_ATTRIBUTES 環境変数を使用します。例:

SHELL
export OTEL_RESOURCE_ATTRIBUTES="service.name=<name_of_service>,service.version=<version_of_service>"

特定のメトリクスをアクティブまたは非アクティブにする

各メトリクスの metrics セクションの enabled フィールドを設定することで、特定のメトリクスをアクティブまたは非アクティブにできます。例:

YAML
receivers:
  samplereceiver:
    metrics:
      metric-one:
        enabled: true
      metric-two:
        enabled: false

以下は、アクティブ化されたメトリクスを持つホスト・メトリクス・レシーバーの構成例です:

YAML
receivers:
  hostmetrics:
    scrapers:
      process:
        metrics:
          process.cpu.utilization:
            enabled: true
注: 非アクティブ化されたメトリックは Splunk Observability Cloud に送信されません。
請求
  • MTS ベースのサブスクリプションの場合、すべてのメトリックがメトリックの使用にカウントされます。

  • ホストベースのプランを使用している場合、このドキュメントでアクティブ(アクティブ:はい)としてリストされているメトリックはデフォルトと見なされ、無料で含まれています。

詳細については、「Infrastructure Monitoringのサブスクリプション使用状況(ホストとメトリクスのプラン)」を参照してください。

設定

以下の表に、ホスト・メトリクス・レシーバーの構成オプションを示します:

同梱

https://raw.githubusercontent.com/splunk/collector-config-tools/main/cfg-metadata/receiver/hostmetrics.yaml

トラブルシューティング

If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways.

Available to Splunk Observability Cloud customers

Available to prospective customers and free trial users

  • Ask a question and get answers through community support at Splunk Answers.

  • Join the Splunk community #observability Slack channel to communicate with customers, partners, and Splunk employees worldwide.