健全性チェック エクステンション

Health Check 拡張機能を使用することで、HTTP URL を有効化して OpenTelemetry Collector の状態を確認することも可能です。この拡張機能を Kubernetes の稼働状況または準備状況のプローブとして使用することもできます。

health_check 拡張機能を使用することで、HTTP URL を有効化して OpenTelemetry Collector の状態を確認することも可能です。この拡張機能は、Kubernetes の稼働状況あるいは準備状況の確認にも利用できます。

はじめに

注: このコンポーネントは、ホスト監視(エージェント)モードでデプロイする場合、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. 次のセクションで説明するように、basicauth エクステンションを設定します。

  3. Collector を再起動します。

サンプル構成

コンポーネントをアクティブにするには、設定ファイルのextensions セクションに health_check を追加します:

YAML
extensions:
  health_check:

設定を完了するには、設定ファイルの service セクションに拡張子を含めます:

YAML
service:
  extensions: [health_check]

エクステンションの設定には以下の設定が必要です:

  • endpointします。ヘルスチェックのステータスを公開するアドレスです。デフォルトでは 0.0.0.0:13133 となっています。

  • pathします。ヘルスチェックサーバーに設定するパスです。デフォルトでは "/" となっています。

  • response_bodyします。ヘルスチェックサービスが返すデフォルトのレスポンスを上書きする静的ボディです。デフォルトでは "" となっています。

  • enabledします。Collector パイプラインチェックを有効にするかどうか指定します。デフォルトでは false です。

  • intervalします。障害数をチェックする間隔です。デフォルトでは 5m です。

  • exporter_failure_thresholdします。コンテナを正常としてマークする障害数のしきい値です。デフォルトでは 5 です。

設定例

これはエクステンションの基本的な設定例です:

YAML
extensions:
  health_check:
  health_check/1:
    endpoint: "localhost:13"
    tls:
      ca_file: "/path/to/ca.crt"
      cert_file: "/path/to/cert.crt"
      key_file: "/path/to/key.key"
    path: "/health/status"
    check_collector_pipeline:
      enabled: true
      interval: "5m"
      exporter_failure_threshold: 5

これは詳細な設定例です:

YAML
health_check:
health_check/1:
  endpoint: "localhost:13"
  tls:
    ca_file: "/path/to/ca"
    key_file: "/path/to/key"
    cert_file: "/path/to/cert"
  check_collector_pipeline:
    enabled: false
    interval: "5m"
    exporter_failure_threshold: 5
health_check/missingendpoint:
  endpoint: ""
  check_collector_pipeline:
    enabled: false
    interval: "5m"
    exporter_failure_threshold: 5
health_check/invalidthreshold:
  endpoint: "localhost:13"
  check_collector_pipeline:
    enabled: false
    interval: "5m"
    exporter_failure_threshold: -1
health_check/invalidpath:
  endpoint: "localhost:13"
  path: "invalid"
  check_collector_pipeline:
    enabled: false
    interval: "5m"
    exporter_failure_threshold: 5

Collector のパイプラインをチェックする

必要に応じて、設定パラメータ check_collector_pipeline を使用して、Collector パイプラインの正常性チェックを有効にすることができます。有効化すると、コンポーネントが接続先へのデータ送信に失敗した回数をモニターできます。

エクスポーターの故障にのみ対応し、レシーバーやプロセッサーには対応しないことに注意してください。

設定

次の表は、health_check エクステンションの設定オプションを示しています:

同梱

https://raw.githubusercontent.com/splunk/collector-config-tools/main/cfg-metadata/extension/health_check.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.