コンテンツにスキップ

データ取り込み可用性チェック

·


このコレクターは、データ取り込みの可用性と遅延を検出するために使用します。メトリクス、ログ、トレースの探測データを自動生成し、DQL クエリでデータが正常に取り込まれているかを検証し、データ送信からクエリ可能になるまでの遅延時間を測定します。

前提条件

  • データ送信と DQL クエリのために DataWay を設定する必要があります
  • result_workspace を設定した場合は、そのワークスペース URL にアクセスできることを確認してください

設定

DataKit のインストールディレクトリにある conf.d/samples ディレクトリへ移動し、ingestion_canary.conf.sample をコピーして ingestion_canary.conf に名前を変更します。例は次のとおりです。

[[inputs.ingestion_canary]]
  ## 収集間隔、デフォルト 10m
  interval = "10m"

  ## クエリタイムアウト、間隔より短くする必要があります。デフォルト 5m
  query_timeout = "5m"

  ## DQL クエリのポーリング間隔、デフォルト 500ms
  poll_interval = "500ms"

  ## クエリエラーの最大再試行回数、デフォルト 10
  error_retries = 10

  ## メトリクスを報告するための結果ワークスペース URL
  # result_workspace = "https://openway.guance.com?token=xxx"

  ## 収集するデータカテゴリ(metric、logging、tracing)
  ## 指定しない場合は、すべてのカテゴリを収集します
  categories = ["metric", "logging", "tracing"]

  ## ログ設定
  [inputs.ingestion_canary.logging]
    storage_index = "default"

  ## エレクションモードを有効化
  election = true

  ## 追加タグ
  [inputs.ingestion_canary.tags]
  # some_tag = "some_value"
  # more_tag = "some_other_value"

設定後、DataKit を再起動 すれば完了です。

ConfigMap 方式でコレクター設定を注入 するか、ENV_DATAKIT_INPUTS を設定 してコレクターを有効化できます。

メトリクスの説明

このコレクターは 2 種類のデータを生成します。

  1. テストデータ: データ取り込みの可用性を検証するための探測データポイント(メトリクス、ログ、トレース)
  2. 結果メトリクス: 遅延時間とテスト状態を含む、テスト結果のメトリクスデータ

探測データポイントにはグローバルタグは付与されず、データポイント自身のフィールドとタグ、および設定で指定した tags のみが含まれます。

テストデータ

ingestion_canary (メトリクス)

Synthetic metric points emitted by the collector per probe round to verify metric ingestion path.

Tags & Fields Description
test_type
(tag)
テスト種別: collect (collector) または cmd (CLI tool)
round ingestion canary のプローブラウンド番号。
Type: int | (gauge)
Unit: count
Tagged by: test_type

ingestion_canary (ログ)

Synthetic logging payload emitted by the canary to verify logging ingestion path.

Tags & Fields Description
test_type
(tag)
テスト種別: collect (collector) または cmd (CLI tool)
message ingestion canary のプローブが出力する合成ログメッセージ。
Type: string
Unit: N/A
Tagged by: test_type
round ingestion canary のプローブラウンド番号。
Type: int
Unit: count
Tagged by: test_type

ingestion_canary (トレース)

Synthetic tracing payload emitted by the canary to verify trace collection and forwarding.

Tags & Fields Description
service
(tag)
サービス名
source
(tag)
ソース名
span_type
(tag)
Span 種別
test_type
(tag)
テスト種別: collect (collector) または cmd (CLI tool)
duration トレース span の継続時間(マイクロ秒)。
Type: int
Unit: time,μs
Tagged by: service, source, span_type, test_type
parent_id ingestion canary のプローブが出力する親 span ID。
Type: string
Unit: N/A
Tagged by: service, source, span_type, test_type
resource ingestion canary のプローブが出力する合成リソース名。
Type: string
Unit: N/A
Tagged by: service, source, span_type, test_type
round ingestion canary のプローブラウンド番号。
Type: int
Unit: count
Tagged by: service, source, span_type, test_type
span_id ingestion canary のプローブが出力する span ID。
Type: string
Unit: N/A
Tagged by: service, source, span_type, test_type
start Unix タイムスタンプ(マイクロ秒)で表したトレース span の開始時刻。
Type: int
Unit: timeStamp,usec
Tagged by: service, source, span_type, test_type
status ingestion canary のプローブが出力する合成 span ステータス。
Type: string
Unit: N/A
Tagged by: service, source, span_type, test_type
trace_id ingestion canary のプローブが出力する trace ID。
Type: string
Unit: N/A
Tagged by: service, source, span_type, test_type

結果メトリクス

ingestion_canary_result

各 ingestion canary プローブラウンドの結果メトリクス。カテゴリ、状態、保存先、遅延を含みます。

Tags & Fields Description
category
(tag)
データカテゴリ: M (metric), L (logging), T (tracing)
status
(tag)
テスト状態: ok, timeout, error
storage_index
(tag)
ログデータの storage index(任意)
latency_ms canary ポイントを投入してからクエリ可能になるまでの遅延(ミリ秒)。
Type: int | (gauge)
Unit: time,ms
Tagged by: category, status, storage_index, test_type

コマンドラインツール

コレクター・モードに加えて、ワンショットテスト用のコマンドラインツールも提供されています。

# デフォルト設定を使用
datakit tool --ingestion-canary

# ログデータの storage index を指定
datakit tool --ingestion-canary --ingestion-canary-index my_index

パラメータの説明:

  • --ingestion-canary: ingestion canary テストツールを有効化します
  • --ingestion-canary-index: ログデータの storage index を指定します。デフォルトは "default" です(ログデータのみ有効)

機能の説明:

このツールは 1 ラウンド分の探測データ(メトリクス、ログ、トレース)を生成して DataWay に送信し、データが見つかるまで、またはユーザーが中断するまで継続的にクエリを実行し、各データ種別の遅延時間を出力します。ツールは継続して動作し、各テストラウンドの間隔は 10 秒です。

フィードバック

このページは役に立ちましたか?