Splunk HTTP Event Collector (HEC) Destination
概要
Observability Pipelines の Splunk HTTP Event Collector (HEC) Destination を使用して、ログを Splunk HEC に送信します。
注: Observability Pipelines は、gzip (レベル 6) アルゴリズムを使用してログを圧縮します。
セットアップ
シークレット管理の場合: Splunk HEC トークンとエンドポイントの識別子のみを入力してください。実際の値は入力しないでください。
パイプラインをセットアップする際に、Splunk HEC 送信先を構成します。パイプラインのセットアップは、UI で、API を使用して、または Terraform を使用して行えます。このセクションの手順は UI で構成されます。
パイプライン UI で Splunk HEC 送信先を選択した後:
- [Token strategy] ドロップダウンメニューの場合:
- Splunk HEC ソースを使用しており、ソースで From Source を有効にしている場合にのみ Store HEC token を選択してください。そうでない場合、エラーが発生し、Worker のインストールに進むことができません。このオプションは、Observability Pipelines が受信したトークンを Splunk HEC 送信先に転送します。
- デフォルトの Custom トークン戦略を使用する場合は、トークンの識別子を入力します。空白のままにすると、デフォルトが使用されます。
- エンドポイント URL の識別子を入力します。空白のままにすると、デフォルトが使用されます。
- ドロップダウンメニューで Encoding を選択します (JSON または Raw)。
- JSON を選択した場合、必要に応じて [Add Field] をクリックして、インデックス付きフィールド として抽出するフィールドを指定します。Splunk HTTP Event Collector は、ログを取り込む際に指定されたフィールドをインデックス化します。
- 注: Raw エンドポイントターゲットは [Index Fields] をサポートしていません。
If you enter secret identifiers and then choose to use environment variables, the environment variable is the identifier entered and prepended with DD_OP_. For example, if you entered PASSWORD_1 for a password identifier, the environment variable for that password is DD_OP_PASSWORD_1.
オプション設定
Splunk インデックス
データを格納したい Splunk インデックスの名前を入力してください。このインデックスは、使用している HEC で許可されている必要があります。ログの特定のフィールドに基づいて異なるインデックスにログを振り分ける場合は、テンプレート構文を参照してください。
エンドポイントターゲット
[Endpoint Target] ドロップダウンメニューで、イベントの送信先となる Splunk HEC エンドポイントを選択します。
- Event (デフォルト): Splunk の
/event HEC エンドポイントにイベントを送信します。このエンドポイントは、自動抽出されたタイムスタンプとインデックス付きフィールドをサポートしています。 - Raw: Splunk の
/raw HEC エンドポイントにイベントを送信します。
タイムスタンプを自動抽出するかどうかを選択します。true に設定すると、Splunk は yyyy-mm-dd hh:mm:ss の予期される形式でメッセージからタイムスタンプを抽出します。
注: Raw エンドポイントターゲットは [Auto-extract timestamp] をサポートしていません。
ソースタイプのオーバーライド
sourcetype を設定して、Splunk のデフォルト値 (HEC データの場合は httpevent) を上書きします。ログの特定のフィールドに基づいて異なるソースタイプにログを振り分ける場合は、テンプレート構文を参照してください。
バッファリング
Toggle the switch to enable Buffering Options. Enable a configurable buffer on your destination to ensure intermittent latency or an outage at the destination doesn’t create immediate backpressure, and allow events to continue to be ingested from your source. Disk buffers can also increase pipeline durability by writing data to disk, ensuring buffered data persists through a Worker restart. See Destination buffers for more information.
- If left unconfigured, your destination uses a memory buffer with a capacity of 500 events.
- To configure a buffer on your destination:
- Select the buffer type you want to set (Memory or Disk).
- Enter the buffer size and select the unit.
- Maximum memory buffer size is 128 GB.
- Maximum disk buffer size is 5 TB.
- Note: For Worker versions 2.20.x and older, the maximum disk buffer size is 500 GB.
- In the Behavior on full buffer dropdown menu, select whether you want to block events or drop new events when the buffer is full.
シークレットのデフォルト
These are the defaults used for secret identifiers and environment variables.
- Splunk HEC token identifier:
- References the Splunk HEC token for the Splunk indexer.
- The default identifier is
DESTINATION_SPLUNK_HEC_TOKEN.
- Splunk HEC endpoint URL identifier:
- References the Splunk HTTP Event Collector endpoint your Observability Pipelines Worker sends processed data to. For example,
https://hec.splunkcloud.com:8088. - Note:
/services/collector/event path is automatically appended to the endpoint. - The default identifier is
DESTINATION_SPLUNK_HEC_ENDPOINT_URL.
- Splunk HEC token:
- The Splunk HEC token for the Splunk indexer. Note: Depending on your shell and environment, you may not want to wrap your environment variable in quotes.
- The default environment variable is
DD_OP_DESTINATION_SPLUNK_HEC_TOKEN.
- Base URL of the Splunk instance:
- The Splunk HTTP Event Collector endpoint your Observability Pipelines Worker sends processed data to. For example,
https://hec.splunkcloud.com:8088.
Note: /services/collector/event path is automatically appended to the endpoint. - The default environment variable is
DD_OP_DESTINATION_SPLUNK_HEC_ENDPOINT_URL.
トラブルシューティング
401 Unauthorized エラー
If the destination returns a 401 Unauthorized error, check the value stored for your Splunk HEC token identifier. Store only the token itself (for example, <GUID>).
健全性メトリクス
すべての送信先から送信されるコンポーネントメトリクスおよび送信先バッファメトリクスについては、Pipelines 使用状況メトリクスのドキュメントを参照してください。
Splunk HEC メトリクス
component_id タグを使用して、個々のコンポーネントでフィルタリングまたはグループ化します。- Splunk HEC メトリクスでは
component_type タグは splunk_hec_logs です。
pipelines.splunk_pending_acks- 説明: 応答を待機している未処理の Splunk HEC インデクサー確認応答の数。
- メトリクスタイプ: ゲージ
送信先の仕組み
イベントのバッチ処理
イベントのバッチは、次のパラメーターのいずれかが満たされたときにフラッシュされます。詳細については、送信先のイベントのバッチ処理 を参照してください。
| 最大イベント数 | 最大サイズ (MB) | タイムアウト (秒) |
|---|
| なし | 1 | 1 |