概要
Observability Pipelines の Amazon OpenSearch 送信先を使用して、ログを Amazon OpenSearch に送信します。
セットアップ
シークレット管理の場合: Amazon OpenSearch エンドポイント URL の識別子、および該当する場合やユーザー名とパスワードのみを入力します。実際の値は入力しないでください。
パイプラインをセットアップする際に、Amazon OpenSearch 送信先を構成します。パイプラインは、UI、API、または Terraform を使用してセットアップできます。このセクションの手順は、UI で設定します。
パイプライン UI で Amazon OpenSearch 送信先を選択したら、次のようにします。
- Amazon OpenSearch エンドポイント URL の識別子を入力します。空白のままにすると、デフォルトが使用されます。
- [Mode] (モード) ドロップダウンメニューで、[Bulk] (一括) または [Data streams] (データストリーム) を選択します。
- Bulkモード
- Amazon OpenSearch の Bulk API を使用して、バッチ処理されたイベントを標準インデックスに直接送信します。
- インデックスの命名やライフサイクル管理を直接制御する場合に、このモードを選択します。データは指定したインデックスに追加されます。ロールオーバー、削除、マッピングの処理はユーザーが行う必要があります。
- [Bulk] モードを構成するには、次のようにします。
- [Index] (インデックス) フィールドに、必要に応じて Amazon OpenSearch インデックスの名前を入力します。テンプレート構文を使用すると、ログ内の特定のフィールドに基づいて異なるインデックスに動的にログをルーティングできます (例:
logs-{{service}}.
- Data streams モード
- Uses Amazon OpenSearch Data Streams for log storage. Data streams automatically manage backing indexes and rollovers, making them ideal for timeseries log data.
- Choose this mode when you want Amazon OpenSearch to manage the index lifecycle for you. Data streams ensures smooth rollovers, Index Lifecycle Management (ILM) compatibility, and optimized handling of time-based data.
- To configure Data streams モードを構成するには、必要に応じて、データストリーム名を定義します (デフォルトは
logs-generic-default) by entering the following information:。- In the Type フィールドに、取り込むデータのカテゴリを入力します。例:
logs. - In the Dataset フィールドに、構造を記述する形式またはデータソースを指定します。例:
apache. - In the Namespace フィールドに、データストリームを分類するためのグループを入力します。例:
production. - You can use template syntax for the Type] (タイプ)、[Dataset] (データセット)、および [Namespace] (名前空間) フィールドを使用して、ログ内の特定のフィールドに基づいてデータストリーム名を動的に作成します。
- In the UI, there is a preview of the data stream name you configured. With the above example inputs, the data stream name that the Worker writes to is
logs-apache-production.
- 必要に応じて、Amazon OpenSearch インデックス名を入力します。ログの特定のフィールドに基づいて異なるインデックスにログを振り分ける場合は、テンプレート構文を参照してください。
- 認証戦略として、[Basic] (基本) または [AWS] を選択します。選択内容に応じて、次のいずれかを行います。
- Basic:
- ご使用の Amazon OpenSearch ユーザーの識別子を入力します。空白のままにすると、デフォルトが使用されます。
- ご使用の Amazon OpenSearch パスワードの識別子を入力します。空白のままにすると、デフォルトが使用されます。
- AWS:
- AWS リージョンを入力します。
- (オプション) AWS 認証オプションを選択します。[Assume role] (ロールの引き受け) オプションは、以前に作成したユーザーまたはロールが特定の AWS リソースにアクセスするために別のロールを引き受ける必要があり、その権限を明示的に定義する必要がある場合にのみ使用してください。
[Assume role] を選択した場合は、次のようにします。- 引き受ける IAM ロールの ARN を入力します。
- 必要に応じて、引き受けるロールのセッション名と外部 ID を入力します。
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.
オプションのバッファリング
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.
- Amazon OpenSearch エンドポイント URL の識別子:
- デフォルトの識別子は
DESTINATION_AMAZON_OPENSEARCH_ENDPOINT_URL です。
- Amazon OpenSearch 認証ユーザーの識別子:
- デフォルトの識別子は
DESTINATION_AMAZON_OPENSEARCH_USERNAME です。
- Amazon OpenSearch 認証パスワードの識別子:
- デフォルトの識別子は
DESTINATION_AMAZON_OPENSEARCH_PASSWORD です。
- Amazon OpenSearch authentication username:
- The default environment variable is
DD_OP_DESTINATION_AMAZON_OPENSEARCH_USERNAME.
- Amazon OpenSearch authentication password:
- The default environment variable is
DD_OP_DESTINATION_AMAZON_OPENSEARCH_PASSWORD.
- Amazon OpenSearch endpoint URL:
- The default environment variable is
DD_OP_DESTINATION_AMAZON_OPENSEARCH_ENDPOINT_URL.
健全性メトリクス
すべての送信先から送信されるコンポーネントメトリクスおよび送信先バッファメトリクスについては、パイプライン使用状況メトリクスのドキュメントを参照してください。Elasticsearch 送信先メトリクスでフィルタリングまたはグループ化するには、タグ component_type:elasticsearch を使用します。
送信先の動作
イベントのバッチ処理
イベントのバッチは、次のパラメーターのいずれかが満たされたときにフラッシュされます。詳細については、送信先のイベントのバッチ処理を参照してください。
| 最大イベント数 | 最大サイズ (MB) | タイムアウト (秒) |
|---|
| なし | 10 | 1 |