This product is not supported for your selected Datadog site. ().

概要

クレジットカード番号、銀行のルーティング番号、API キーなどの機密データは、意図せずログに含まれる可能性があり、組織を財務面やプライバシー面のリスクにさらすおそれがあります。

Observability Pipelines を使用すると、ログをさまざまな宛先へルーティングする前に機密情報を特定・タグ付けし、必要に応じてマスキングまたはハッシュ化を行うことができます。メールアドレス、クレジットカード番号、API キー、認証トークンなどの一般的なパターンは、あらかじめ用意されたスキャンルールで検出可能です。また、独自の正規表現パターンを使用してカスタムスキャンルールを作成し、機密情報を検出することもできます。

The log sources, processors, and destinations available for this use case

このドキュメントでは、以下の手順を説明します。

  1. Observability Pipelines の設定に必要な前提条件
  2. Observability Pipelines のセットアップ

前提条件

To use Observability Pipelines’ HTTP/S Client source, you need the following information available:

  1. The full path of the HTTP Server endpoint that the Observability Pipelines Worker collects log events from. For example, https://127.0.0.8/logs.
  2. The HTTP authentication token or password.

The HTTP/S Client source pulls data from your upstream HTTP server. Your HTTP server must support GET requests for the HTTP Client endpoint URL that you set as an environment variable when you install the Worker.

観測可能性パイプラインを設定する

  1. Observability Pipelines に移動します。
  2. Sensitive Data Redactions テンプレートを選択し、新しいパイプラインを作成します。
  3. ソースとして HTTP Client を選択します。

ソースの設定

To configure your HTTP/S Client source:

  1. Select your authorization strategy.
  2. Select the decoder you want to use on the HTTP messages. Logs pulled from the HTTP source must be in this format.
  3. Optionally, toggle the switch to enable TLS. If you enable TLS, the following certificate and key files are required.
    Note: All file paths are made relative to the configuration data directory, which is /var/lib/observability-pipelines-worker/config/ by default. See Advanced Configurations for more information. The file must be owned by the observability-pipelines-worker group and observability-pipelines-worker user, or at least readable by the group or user.
    • Server Certificate Path: The path to the certificate file that has been signed by your Certificate Authority (CA) Root File in DER or PEM (X.509) format.
    • CA Certificate Path: The path to the certificate file that is your Certificate Authority (CA) Root File in DER or PEM (X.509) format.
    • Private Key Path: The path to the .key private key file that belongs to your Server Certificate Path in DER or PEM (PKCS#8) format.
  4. Enter the interval between scrapes.
    • Your HTTP Server must be able to handle GET requests at this interval.
    • Since requests run concurrently, if a scrape takes longer than the interval given, a new scrape is started, which can consume extra resources. Set the timeout to a value lower than the scrape interval to prevent this from happening.
  5. Enter the timeout for each scrape request.

宛先の設定

選択したログの送信先に応じて、以下の情報を入力します。

Datadog の宛先に関して必要な構成手順はありません。

  • Splunk HEC アドレス:
    • Observability Pipelines Worker がリッスンして、本来 Splunk インデクサー向けであるログを受信するバインドアドレスです。例えば、0.0.0.0:8088
      : /services/collector/event は自動的にエンドポイントに付加されます。
    • 環境変数 DD_OP_SOURCE_SPLUNK_HEC_ADDRESS に格納されます。

以下のフィールドはオプションです。

  1. Encoding ドロップダウンメニューで、パイプラインの出力を JSONLogfmt、または Raw テキストでエンコードするかを選択します。デコードが選択されていない場合、デフォルトで JSON にデコードされます。
  2. Sumo Logic コレクターのソースに設定されたデフォルトの name 値を上書きするには、source name を入力します。
  3. Sumo Logic コレクターのソースに設定されたデフォルトの host 値を上書きするには、host name を入力します。
  4. Sumo Logic コレクターのソースに設定されたデフォルトの category 値を上書きするには、category name を入力します。
  5. カスタムヘッダーフィールドと値を追加するには、Add Header をクリックします。
The rsyslog and syslog-ng destinations support the RFC5424 format.

The rsyslog and syslog-ng destinations match these log fields to the following Syslog fields:

Log EventSYSLOG FIELDDefault
log[“message”]MESSAGENIL
log[“procid”]PROCIDThe running Worker’s process ID.
log[“appname”]APP-NAMEobservability_pipelines
log[“facility”]FACILITY8 (log_user)
log[“msgid”]MSGIDNIL
log[“severity”]SEVERITYinfo
log[“host”]HOSTNAMENIL
log[“timestamp”]TIMESTAMPCurrent UTC time.

The following destination settings are optional:

  1. Toggle the switch to enable TLS. If you enable TLS, the following certificate and key files are required:
    • Server Certificate Path: The path to the certificate file that has been signed by your Certificate Authority (CA) Root File in DER or PEM (X.509).
    • CA Certificate Path: The path to the certificate file that is your Certificate Authority (CA) Root File in DER or PEM (X.509).
    • Private Key Path: The path to the .key private key file that belongs to your Server Certificate Path in DER or PEM (PKCS#8) format.
  2. Enter the number of seconds to wait before sending TCP keepalive probes on an idle connection.
  3. Optionally, toggle the switch to enable Buffering Options.
    Note: Buffering options is in Preview. Contact your account manager to request access.
    • If left disabled, the maximum size for buffering is 500 events.
    • If enabled:
      1. Select the buffer type you want to set (Memory or Disk).
      2. Enter the buffer size and select the unit.

Observability Pipelines Worker for Google Chronicle を認証するには、Google Security Operations の担当者に連絡して Google Developer Service Account Credential を取得してください。このクレデンシャルは JSON ファイルであり、DD_OP_DATA_DIR/config に配置する必要があります。詳細については、API 認証情報の取得を参照してください。

Worker の Google Chronicle 宛先を設定するには、以下の手順を行います:

  1. Google Chronicle インスタンスのカスタマー ID を入力します。
  2. 先ほどダウンロードした資格情報 JSON ファイルへのパスを入力します。
  3. ドロップダウンメニューで JSON または Raw エンコーディングを選択します。
  4. ログタイプを入力します。ログの特定のフィールドに基づいて異なるログタイプに振り分けたい場合は、テンプレート構文を参照してください。

: Google Chronicle 宛先に送信するログにはインジェスションラベルが必須です。たとえば、A10 ロードバランサーのログであれば、インジェスションラベルとして A10_LOAD_BALANCER を付与する必要があります。利用可能なログタイプと対応するインジェスションラベルの一覧については、Google Cloud のデフォルトパーサーでログタイプをサポートするを参照してください。

The following fields are optional:

  1. Enter the name for the Elasticsearch index. See template syntax if you want to route logs to different indexes based on specific fields in your logs.
  2. Enter the Elasticsearch version.
  3. Optionally, toggle the switch to enable Buffering Options.
    Note: Buffering options is in Preview. Contact your account manager to request access.
    • If left disabled, the maximum size for buffering is 500 events.
    • If enabled:
      1. Select the buffer type you want to set (Memory or Disk).
      2. Enter the buffer size and select the unit.
  1. Optionally, enter the name of the OpenSearch index. See template syntax if you want to route logs to different indexes based on specific fields in your logs.
  2. Optionally, toggle the switch to enable Buffering Options.
    Note: Buffering options is in Preview. Contact your account manager to request access.
    • If left disabled, the maximum size for buffering is 500 events.
    • If enabled:
      1. Select the buffer type you want to set (Memory or Disk).
      2. Enter the buffer size and select the unit.
  1. Optionally, enter the name of the Amazon OpenSearch index. See template syntax if you want to route logs to different indexes based on specific fields in your logs.
  2. Select an authentication strategy, Basic or AWS. For AWS, enter the AWS region.
  3. Optionally, toggle the switch to enable Buffering Options.
    Note: Buffering options is in Preview. Contact your account manager to request access.
    • If left disabled, the maximum size for buffering is 500 events.
    • If enabled:
      1. Select the buffer type you want to set (Memory or Disk).
      2. Enter the buffer size and select the unit.

プロセッサーの設定

There are pre-selected processors added to your processor group out of the box. You can add additional processors or delete any existing ones based on your processing needs.

Processor groups are executed from top to bottom. The order of the processors is important because logs are checked by each processor, but only logs that match the processor’s filters are processed. To modify the order of the processors, use the drag handle on the top left corner of the processor you want to move.

Filter query syntax

Each processor has a corresponding filter query in their fields. Processors only process logs that match their filter query. And for all processors except the filter processor, logs that do not match the query are sent to the next step of the pipeline. For the filter processor, logs that do not match the query are dropped.

For any attribute, tag, or key:value pair that is not a reserved attribute, your query must start with @. Conversely, to filter reserved attributes, you do not need to append @ in front of your filter query.

For example, to filter out and drop status:info logs, your filter can be set as NOT (status:info). To filter out and drop system-status:info, your filter must be set as NOT (@system-status:info).

Filter query examples:

  • NOT (status:debug): This filters for only logs that do not have the status DEBUG.
  • status:ok service:flask-web-app: This filters for all logs with the status OK from your flask-web-app service.
    • This query can also be written as: status:ok AND service:flask-web-app.
  • host:COMP-A9JNGYK OR host:COMP-J58KAS: This filter query only matches logs from the labeled hosts.
  • @user.status:inactive: This filters for logs with the status inactive nested under the user attribute.

Queries run in the Observability Pipelines Worker are case sensitive. Learn more about writing filter queries in Datadog’s Log Search Syntax.

プロセッサを追加

使用するプロセッサの情報を入力します。 Add ボタンをクリックして、プロセッサを追加します。プロセッサを削除するには、プロセッサの右側にあるケバブメニューをクリックし、Delete を選択します。

利用可能なログプロセッサ

このプロセッサーは、指定されたフィルタークエリに一致するログをフィルタリングし、一致しないすべてのログを削除します。このプロセッサーでログが削除された場合、このプロセッサーより下位のプロセッサーはいずれも、そのログを受け取りません。このプロセッサーは、デバッグや警告などの不要なログを除外することができます。

フィルタープロセッサーをセットアップするには

  • フィルタークエリを定義します。クエリを指定すると、それに一致するログのみを通過させ、それ以外のログはすべて削除します。

リマッププロセッサーは、個々のログデータ内のフィールドを追加 (add)、削除 (drop)、またはリネーム (rename) できます。このプロセッサーを使用して、ログに追加のコンテキストを付与したり、ログ容量を削減するために価値の低いフィールドを削除したり、重要な属性全体で命名を標準化したりします。はじめるには、ドロップダウンメニューから add fielddrop field、または rename field を選択してください。

フィールドを追加

add field を使用して、ログに新しいキーと値のペアを追加します。

add field プロセッサーの設定方法

  1. filter query を定義します。指定されたフィルタークエリに一致するログだけが処理されます。クエリに一致する・しないに関係なく、すべてのログはパイプラインの次のステップに送られます。
  2. 追加したいフィールド名と値を入力します。ネストされたフィールドを指定する場合は、パス表記<OUTER_FIELD>.<INNER_FIELD> 形式を使用してください。すべての値は文字列として格納されます。 : 追加しようとしているフィールドがすでに存在する場合、Worker はエラーをスローし、既存のフィールドは変更されません。
フィールドを削除

drop field を使用して、指定したフィルタに一致したログデータからフィールドを削除します。オブジェクトを削除することも可能なため、ネストされたキーを削除する場合にもこのプロセッサーを使用できます。

drop field プロセッサーの設定方法

  1. filter query を定義します。指定されたフィルタークエリに一致するログだけが処理されます。クエリに一致する・しないに関係なく、すべてのログはパイプラインの次のステップに送られます。
  2. 削除したいフィールドのキーを入力します。ネストされたフィールドを指定する場合は、パス表記<OUTER_FIELD>.<INNER_FIELD> 形式を使用してください。 : 指定したキーが存在しない場合、そのログには変更が加えられません。
フィールドをリネーム

rename field を使用して、ログ内のフィールド名を変更します。

rename field プロセッサーの設定方法

  1. filter query を定義します。指定されたフィルタークエリに一致するログだけが処理されます。クエリに一致する・しないに関係なく、すべてのログはパイプラインの次のステップに送られます。
  2. Source field にリネームしたいフィールドの名前を入力します。ネストされたフィールドを指定する場合は、パス表記<OUTER_FIELD>.<INNER_FIELD> 形式を使用してください。リネーム後は元のフィールドが削除されますが、後述の Preserve source tag チェックボックスを有効にすると元のフィールドを保持できます。
    : 指定したソースキーが存在しない場合、デフォルトで null 値がターゲットに適用されます。
  3. Target field にソースフィールドをリネーム後の名前として入力します。ネストされたフィールドを指定する場合は、パス表記<OUTER_FIELD>.<INNER_FIELD> 形式を使用してください。
    : 指定したターゲットフィールドがすでに存在する場合、Worker はエラーをスローし、既存のターゲットフィールドを上書きしません。
  4. 必要に応じて、Preserve source tag チェックボックスをオンにすると、元のソースフィールドを保持して、ソースキーの情報を指定したターゲットキーに重複させることができます。このボックスをオフにした場合は、リネーム後にソースキーが削除されます。
パス表記例

以下のようなメッセージ構造があった場合、double_inner_value という値を持つキーを指すには、outer_key.inner_key.double_inner_key のように記述します:

{
    "outer_key": {
        "inner_key": "inner_value",
        "a": {
            "double_inner_key": "double_inner_value",
            "b": "b value"
        },
        "c": "c value"
    },
    "d": "d value"
}

This processor samples your logging traffic for a representative subset at the rate that you define, dropping the remaining logs. As an example, you can use this processor to sample 20% of logs from a noisy non-critical service.

The sampling only applies to logs that match your filter query and does not impact other logs. If a log is dropped at this processor, none of the processors below receives that log.

To set up the sample processor:

  1. Define a filter query. Only logs that match the specified filter query are sampled at the specified retention rate below. The sampled logs and the logs that do not match the filter query are sent to the next step in the pipeline.
  2. Enter your desired sampling rate in the Retain field. For example, entering 2 means 2% of logs are retained out of all the logs that match the filter query.
  3. Optionally, enter a Group By field to create separate sampling groups for each unique value for that field. For example, status:error and status:info are two unique field values. Each bucket of events with the same field is sampled independently. Click Add Field if you want to add more fields to partition by. See the group-by example.
Group-by example

If you have the following setup for the sample processor:

  • Filter query: env:staging
  • Retain: 40% of matching logs
  • Group by: status and host
The sample processor with example values

Then, 40% of logs for each unique combination of status and service from env:staging is retained. For example:

  • 40% of logs with status:info and service:networks are retained.
  • 40% of logs with status:info and service:core-web are retained.
  • 40% of logs with status:error and service:networks are retained.
  • 40% of logs with status:error and service:core-web are retained.

This processor parses logs using the grok parsing rules that are available for a set of sources. The rules are automatically applied to logs based on the log source. Therefore, logs must have a source field with the source name. If this field is not added when the log is sent to the Observability Pipelines Worker, you can use the Add field processor to add it.

If the source field of a log matches one of the grok parsing rule sets, the log’s message field is checked against those rules. If a rule matches, the resulting parsed data is added in the message field as a JSON object, overwriting the original message.

If there isn’t a source field on the log, or no rule matches the log message, then no changes are made to the log and it is sent to the next step in the pipeline.

Datadog’s Grok patterns differ from the standard Grok pattern, where Datadog’s Grok implementation provides:

  • Matchers that include options for how you define parsing rules
  • Filters for post-processing of extracted data
  • A set of built-in patterns tailored to common log formats

See Parsing for more information on Datadog’s Grok patterns.

To set up the grok parser, define a filter query. Only logs that match the specified filter query are processed. All logs, regardless of whether they match the filter query, are sent to the next step in the pipeline.

To test log samples for out-of-the-box rules:

  1. Click the Preview Library Rules button.
  2. Search or select a source in the dropdown menu.
  3. Enter a log sample to test the parsing rules for that source.

To add a custom parsing rule:

  1. Click Add Custom Rule.
  2. If you want to clone a library rule, select Clone library rule and then the library source from the dropdown menu.
  3. If you want to create a custom rule, select Custom and then enter the source. The parsing rules are applied to logs with that source.
  4. Enter log samples to test the parsing rules.
  5. Enter the rules for parsing the logs. See Parsing for more information on writing parsing rules with Datadog Grok patterns.
    Note: The url, useragent, and csv filters are not available.
  6. Click Advanced Settings if you want to add helper rules. See Using helper rules to factorize multiple parsing rules for more information.
  7. Click Add Rule.

クォータプロセッサは、指定したフィルターに一致するログのロギングトラフィックを測定します。構成された日次クォータが 24 時間のローリングウィンドウ内で達成されると、プロセッサは追加のログをドロップするか、Datadog モニターを使用してアラートを送信することができます。プロセッサは、総ボリュームまたはイベントの総数を追跡するように構成できます。パイプラインは、Worker の複数の Remote Configuration デプロイメント間でクォータを識別するために、クォータの名前を使用します。

例えば、このプロセッサを構成して、過去 24 時間以内に特定のサービスから 1000 万件のイベントを受信した後に、新しいログを削除するか、削除せずにアラートをトリガーするように構成できます。

クォータプロセッサを設定するには、次の手順に従ってください、

  1. クォータプロセッサの名前を入力します。
  2. フィルタークエリを定義します。指定したフィルタークエリに一致するログのみが日次制限にカウントされます。
    • クォータフィルターに一致し、かつ日次クォータ内のログは、パイプラインの次のステップに送信されます。
    • クォータフィルターに一致しないログも、パイプラインの次のステップに送信されます。
  3. Unit for quota (クォータの単位) ドロップダウンメニューで、クォータを Events の数か、バイト単位の Volume で測定するかを選択します。
  4. 日次クォータの上限を設定し、希望するクォータの大きさの単位を選択します。
  5. クォータが上限に達した場合にすべてのイベントを削除したい場合は、Drop events (イベントを削除) のチェックボックスをオンにします。クォータが上限に達したときにアラートを送信するモニターをセットアップする場合は、チェックを外しておきます。
    • 日次クォータの上限に達した後にクォータフィルターに一致するログが受信され、Drop events (イベントを削除) オプションが選択されている場合、それらのログは削除されます。この場合、フィルタークエリに一致しなかったログのみがパイプラインの次のステップに送信されます。
    • 日次クォータの上限に達した後でも Drop events (イベントを削除) オプションが選択されていない場合、クォータフィルターに一致するログと一致しなかったログが共にパイプラインの次のステップに送信されます。
  6. オプション: 特定のサービスまたはリージョンフィールドにクォータを設定したい場合は、Add Field をクリックします。 a. パーティション分割したいフィールド名を入力します。詳細はパーティションの例を参照してください。 i. クォータをパーティションに一致するイベントのみに適用したい場合は、Ignore when missing を選択します。詳細は「欠落時に無視」オプションの例を参照してください。 ii. オプション: パーティション化されたフィールドに異なるクォータを設定したい場合は、Overrides をクリックします。
  • CSV の構造例については、Download as CSV をクリックします。
  • オーバーライド CSV をドラッグアンドドロップしてアップロードします。または、Browse をクリックしてファイルを選択してアップロードすることもできます。詳細はオーバーライドの例を参照してください。 b. もう 1 つのパーティションを追加したい場合は、Add Field をクリックします。

パーティションの例

特定のサービスまたはリージョンにクォータを設定したい場合は、Partition by を使用します。例えば、1 日に 10 件のイベントのクォータを設定し、service フィールドでイベントをグループ化したい場合、servicePartition by フィールドに入力します。

「欠落時に無視」オプションの例

クォータをパーティションに一致するイベントのみに適用したい場合は、Ignore when missing を選択します。例えば、Worker が次のイベントセットを受信した場合:

{"service":"a", "source":"foo", "message": "..."}
{"service":"b", "source":"bar", "message": "..."}
{"service":"b", "message": "..."}
{"source":"redis", "message": "..."}
{"message": "..."}

そして Ignore when missing が選択されている場合、Worker は:

  • service:asource:foo を持つログのセットを作成します
  • service:bsource:bar を持つログのセットを作成します
  • 最後の 3 つのイベントを無視します

クォータは 2 つのログセットに適用され、最後の 3 つのイベントには適用されません。

Ignore when missing が選択されていない場合、クォータは 5 つのすべてのイベントに適用されます。

オーバーライドの例

service でパーティション分割し、2 つのサービス ab がある場合、オーバーライドを使用してそれぞれに異なるクォータを適用できます。例えば、service:a に 5,000 バイトのクォータ制限、service:b に 50 イベントの制限を設定したい場合、オーバーライドルールは次のようになります。

サービスタイプLimit
aBytes5,000
bイベント50

The reduce processor groups multiple log events into a single log, based on the fields specified and the merge strategies selected. Logs are grouped at 10-second intervals. After the interval has elapsed for the group, the reduced log for that group is sent to the next step in the pipeline.

To set up the reduce processor:

  1. Define a filter query. Only logs that match the specified filter query are processed. Reduced logs and logs that do not match the filter query are sent to the next step in the pipeline.
  2. In the Group By section, enter the field you want to group the logs by.
  3. Click Add Group by Field to add additional fields.
  4. In the Merge Strategy section:
    • In On Field, enter the name of the field you want to merge the logs on.
    • Select the merge strategy in the Apply dropdown menu. This is the strategy used to combine events. See the following Merge strategies section for descriptions of the available strategies.
    • Click Add Merge Strategy to add additional strategies.
Merge strategies

These are the available merge strategies for combining log events.

NameDescription
ArrayAppends each value to an array.
ConcatConcatenates each string value, delimited with a space.
Concat newlineConcatenates each string value, delimited with a newline.
Concat rawConcatenates each string value, without a delimiter.
DiscardDiscards all values except the first value that was received.
Flat uniqueCreates a flattened array of all unique values that were received.
Longest arrayKeeps the longest array that was received.
MaxKeeps the maximum numeric value that was received.
MinKeeps the minimum numeric value that was received.
RetainDiscards all values except the last value that was received. Works as a way to coalesce by not retaining `null`.
Shortest arrayKeeps the shortest array that was received.
SumSums all numeric values that were received.

重複排除 (deduplicate) プロセッサーは、ボリュームとノイズを削減するためにデータの重複を削除します。一度に 5,000 件のメッセージをキャッシュし、そこに対して受信ログを比較します。たとえば、複数の同一の警告ログが連続で送信される場合に、ユニークな警告ログのみを保持したいときに使用できます。

Deduplicate プロセッサーの設定方法

  1. フィルタークエリを定義します。指定したフィルタークエリに一致するログだけが処理されます。重複排除されたログと、フィルタークエリに一致しないログはパイプラインの次のステップに送られます。
  2. Type of deduplication ドロップダウンメニューで、下記のフィールドについて Match するか、または Ignore するかを選択します。
    • Match を選択した場合、ログが通過した後、下記で指定するすべてのフィールドの値が同一である将来のログが削除されます。
    • Ignore を選択した場合、ログが通過した後、下記で指定するフィールドを除いたすべてのフィールドの値が同一である将来のログが削除されます。
  3. Match する、または Ignore するフィールドを入力します。最低 1 つのフィールドが必要で、最大 3 つのフィールドを指定できます。
    • サブフィールドを指定する場合は、<OUTER_FIELD>.<INNER_FIELD> のようなパス表記を使用します。詳細は、パス表記の例を参照してください。
  4. Add field をクリックして、フィルターの対象にしたいフィールドを追加します。
パス表記の例

以下のようなメッセージ構造があった場合、double_inner_value という値を持つキーを指すには、outer_key.inner_key.double_inner_key のように記述します:

{
    "outer_key": {
        "inner_key": "inner_value",
        "a": {
            "double_inner_key": "double_inner_value",
            "b": "b value"
        },
        "c": "c value"
    },
    "d": "d value"
}

Sensitive Data Scanner プロセッサはログをスキャンして、PII、PCI、カスタムの機密データなどの機密情報を検出し、マスキングまたはハッシュ化します。機密データをスキャンするには、当社のライブラリから定義済みのルールを選択するか、カスタムの正規表現ルールを入力できます。

Sensitive Data Scanner プロセッサをセットアップするには

  1. フィルタークエリを定義します。指定したフィルタークエリに一致するログのみがスキャンおよび処理されます。フィルタークエリに一致するかどうかにかかわらず、すべてのログはパイプラインの次のステップに送信されます。
  2. Add Scanning Rule をクリックします。
  3. スキャンルールに名前を付けます。
  4. Select scanning rule type フィールドで、ライブラリからルールを作成するか、カスタムルールを作成するかを選択します。
    • ライブラリからルールを作成する場合は、使用するライブラリパターンを選択します。
    • カスタムルールを作成する場合は、データに対して確認する正規表現パターンを入力します。
  5. Scan entire or part of event セクションで、ドロップダウンメニューの Entire Event (イベント全体)、Specific Attributes (特定の属性)、Exclude Attributes (属性の除外) からスキャン対象を選択します。
    • Specific Attributes (特定の属性) を選択した場合は、Add Field をクリックし、スキャンする特定の属性を入力します。最大 3 つのフィールドを追加できます。ネストされたキーにアクセスするには、パス記法 (outer_key.inner_key) を使用します。ネストされたデータを持つ特定の属性では、すべてのネストされたデータがスキャンされます。
    • Exclude Attributes (属性の除外) を選択した場合は、Add Field をクリックし、スキャンから除外する特定の属性を入力します。最大 3 つのフィールドを追加できます。ネストされたキーにアクセスするには、パス記法 (outer_key.inner_key) を使用します。ネストされたデータを持つ指定された属性については、すべてのネストされたデータが除外されます。
  6. Define action on match セクションで、一致した情報に対して実行するアクションを選択します。: マスキング、部分的なマスキング、およびハッシュ化はすべて元に戻せないアクションです。
    • 情報をマスキングする場合は、一致したデータを置き換えるテキストを指定します。
    • 情報を部分的にマスキングする場合は、マスキングする文字数を指定し、部分的なマスキングを一致したデータの先頭または末尾に適用するかどうかを指定します。
    • : ハッシュ化を選択した場合、一致した UTF-8 バイトは FarmHash の 64 ビットフィンガープリントでハッシュ化されます。
  7. オプションとして、正規表現に一致するすべてのイベントにタグを追加し、イベントのフィルタリング、分析、アラートを行うことができます。

This processor adds a field with the name of the host that sent the log. For example, hostname: 613e197f3526. Note: If the hostname already exists, the Worker throws an error and does not overwrite the existing hostname.

To set up this processor:

  • Define a filter query. Only logs that match the specified filter query are processed. All logs, regardless of whether they do or do not match the filter query, are sent to the next step in the pipeline.

This processor parses the specified JSON field into objects. For example, if you have a message field that contains stringified JSON:

{
    "foo": "bar",
    "team": "my-team",
    "message": "{\"level\":\"info\",\"timestamp\":\"2024-01-15T10:30:00Z\",\"service\":\"user-service\",\"user_id\":\"12345\",\"action\":\"login\",\"success\":true,\"ip_address\":\"192.168.1.100\"}"
    "app_id":"streaming-services",
    "ddtags": [
    "kube_service:my-service",
    "k8_deployment :your-host"
    ]
}

Use the Parse JSON processor to parse the message field so the message field has all the attributes within a nested object.

The parse json processor with message as the field to parse on

This output contains the message field with the parsed JSON:

{
    "foo": "bar",
    "team": "my-team",
    "message": {
        "action": "login",
        "ip_address": "192.168.1.100",
        "level": "info",
        "service": "user-service",
        "success": true,
        "timestamp": "2024-01-15T10:30:00Z",
        "user_id": "12345"
    }
    "app_id":"streaming-services",
    "ddtags": [
    "kube_service:my-service",
    "k8_deployment :your-host"
    ]
}

To set up this processor:

  1. Define a filter query. Only logs that match the specified filter query are processed. All logs, regardless of whether they do or do not match the filter query, are sent to the next step in the pipeline.
  2. Enter the name of the field you want to parse JSON on.
    Note: The parsed JSON overwrites what was originally contained in the field.

Use this processor to enrich your logs with information from a reference table, which could be a local file or database.

To set up the enrichment table processor:

  1. Define a filter query. Only logs that match the specified filter query are processed. All logs, regardless of whether they do or do not match the filter query, are sent to the next step in the pipeline.
  2. Enter the source attribute of the log. The source attribute’s value is what you want to find in the reference table.
  3. Enter the target attribute. The target attribute’s value stores, as a JSON object, the information found in the reference table.
  4. Select the type of reference table you want to use, File or GeoIP.
    • For the File type:
      1. Enter the file path.
        Note: All file paths are made relative to the configuration data directory, which is /var/lib/observability-pipelines-worker/config/ by default. See Advanced Configurations for more information. The file must be owned by the observability-pipelines-worker group and observability-pipelines-worker user, or at least readable by the group or user.
      2. Enter the column name. The column name in the enrichment table is used for matching the source attribute value. See the Enrichment file example.
    • For the GeoIP type, enter the GeoIP path.
Enrichment file example

For this example, merchant_id is used as the source attribute and merchant_info as the target attribute.

This is the example reference table that the enrichment processor uses:

merch_idmerchant_namecitystate
803Andy’s OttomansBoiseIdaho
536Cindy’s CouchesBoulderColorado
235Debra’s BenchesLas VegasNevada

merch_id is set as the column name the processor uses to find the source attribute’s value. Note: The source attribute’s value does not have to match the column name.

If the enrichment processor receives a log with "merchant_id":"536":

  • The processor looks for the value 536 in the reference table’s merch_id column.
  • After it finds the value, it adds the entire row of information from the reference table to the merchant_info attribute as a JSON object:
merchant_info {
    "merchant_name":"Cindy's Couches",
    "city":"Boulder",
    "state":"Colorado"
}

観測可能性パイプラインワーカーのインストール

  1. Choose your installation platform ドロップダウンメニューで使用するプラットフォームを選択します。

  2. HTTP/S エンドポイント URL のフルパスを入力します (例: https://127.0.0.8/logs)。Observability Pipelines Worker はこのエンドポイントからログイベントを収集します。

  3. 選択した各宛先に必要な環境変数を設定します。詳細は前提条件を参照してください。

    Datadog ログ管理で構成する環境変数はありません。

    Splunk HEC トークンと Splunk インスタンスのベース URL を入力してください。詳細については、前提条件を参照してください。

    Worker は HEC トークンを Splunk のコレクションエンドポイントに渡します。Observability Pipelines Worker がログを処理した後、指定された Splunk インスタンスの URL にログを送信します。

    : Splunk HEC の送信先は、Splunk HEC の送信先で出力形式を JSON または raw に設定しているかどうかにかかわらず、すべてのログを /services/collector/event エンドポイントに転送します。

    Sumo Logic HTTP コレクター の URLを入力します。詳細は、前提条件を参照してください。

    Enter the rsyslog or syslog-ng endpoint URL. For example, 127.0.0.1:9997. The Observability Pipelines Worker sends logs to this address and port.

    Enter the Google Chronicle endpoint URL. For example, https://chronicle.googleapis.com.

    1. Enter the Elasticsearch authentication username.
    2. Enter the Elasticsearch authentication password.
    3. Enter the Elasticsearch endpoint URL. For example, http://CLUSTER_ID.LOCAL_HOST_IP.ip.es.io:9200.
    1. Enter the OpenSearch authentication username.
    2. Enter the OpenSearch authentication password.
    3. Enter the OpenSearch endpoint URL. For example, http://<hostname.IP>:9200.
    1. Enter the Amazon OpenSearch authentication username.
    2. Enter the Amazon OpenSearch authentication password.
    3. Enter the Amazon OpenSearch endpoint URL. For example, http://<hostname.IP>:9200.

  4. 環境に合わせた手順に従い、Worker をインストールしてください。

    1. Select API key をクリックして、使用する Datadog API キーを選択します。
    2. UI で提供されるコマンドを実行して Worker をインストールします。コマンドには、先ほど入力した環境変数が自動的に入力されます。
      docker run -i -e DD_API_KEY=<DATADOG_API_KEY> \
          -e DD_OP_PIPELINE_ID=<PIPELINE_ID> \
          -e DD_SITE=<DATADOG_SITE> \
          -e <SOURCE_ENV_VARIABLE> \
          -e <DESTINATION_ENV_VARIABLE> \
          -p 8088:8088 \
          datadog/observability-pipelines-worker run
      
      : デフォルトでは、docker run コマンドは Worker がリッスンしているのと同じポートを公開します。ワーカーのコンテナポートを Docker ホストの別のポートにマッピングしたい場合は、コマンドで -p | --publish オプションを使用します。
      -p 8282:8088 datadog/observability-pipelines-worker run
      
    3. Observability Pipelines のインストールページに戻り、Deploy をクリックします。

    パイプラインの構成を変更したい場合は、既存のパイプラインの更新を参照してください。

    1. Amazon EKS 用の Helm チャートの values ファイルをダウンロードします。
    2. Select API key をクリックして、使用する Datadog API キーを選択します。
    3. Datadog チャートリポジトリを Helm に追加します。
      helm repo add datadog https://helm.datadoghq.com
      
      すでに Datadog チャートリポジトリをお持ちの場合は、以下のコマンドを実行し、リポジトリが最新であることを確認してください。
      helm repo update
      
    4. UI で提供されるコマンドを実行して Worker をインストールします。コマンドには、先ほど入力した環境変数が自動的に入力されます。
      helm upgrade --install opw \
      -f aws_eks.yaml \
      --set datadog.apiKey=<DATADOG_API_KEY> \
      --set datadog.pipelineId=<PIPELINE_ID> \
      --set <SOURCE_ENV_VARIABLES> \
      --set <DESTINATION_ENV_VARIABLES> \
      --set service.ports[0].protocol=TCP,service.ports[0].port=<SERVICE_PORT>,service.ports[0].targetPort=<TARGET_PORT> \
      datadog/observability-pipelines-worker
      
      : デフォルトでは、Kubernetes サービスは、受信ポート<SERVICE_PORT> を Worker がリッスンしているポート (<TARGET_PORT>) にマッピングします。Worker のポッドポートを Kubernetes サービスの別の受信ポートにマッピングしたい場合は、コマンドで以下の service.ports[0].port および service.ports[0].targetPort の値を使用します。
      --set service.ports[0].protocol=TCP,service.ports[0].port=8088,service.ports[0].targetPort=8282
      
    5. Observability Pipelines のインストールページに戻り、Deploy をクリックします。

    パイプラインの構成を変更したい場合は、既存のパイプラインの更新を参照してください。

    1. Azure AKS 用の Helm チャートの values ファイルをダウンロードします。
    2. Select API key をクリックして、使用する Datadog API キーを選択します。
    3. Datadog チャートリポジトリを Helm に追加します。
      helm repo add datadog https://helm.datadoghq.com
      
      すでに Datadog チャートリポジトリをお持ちの場合は、以下のコマンドを実行し、リポジトリが最新であることを確認してください。
      helm repo update
      
    4. UI で提供されるコマンドを実行して Worker をインストールします。コマンドには、先ほど入力した環境変数が自動的に入力されます。
      helm upgrade --install opw \
      -f azure_aks.yaml \
      --set datadog.apiKey=<DATADOG_API_KEY> \
      --set datadog.pipelineId=<PIPELINE_ID> \
      --set <SOURCE_ENV_VARIABLES> \
      --set <DESTINATION_ENV_VARIABLES> \
      --set service.ports[0].protocol=TCP,service.ports[0].port=<SERVICE_PORT>,service.ports[0].targetPort=<TARGET_PORT> \
      datadog/observability-pipelines-worker
      
      : デフォルトでは、Kubernetes サービスは、受信ポート<SERVICE_PORT> を Worker がリッスンしているポート (<TARGET_PORT>) にマッピングします。Worker のポッドポートを Kubernetes サービスの別の受信ポートにマッピングしたい場合は、コマンドで以下の service.ports[0].port および service.ports[0].targetPort の値を使用します。
      --set service.ports[0].protocol=TCP,service.ports[0].port=8088,service.ports[0].targetPort=8282
      
    5. Observability Pipelines のインストールページに戻り、Deploy をクリックします。

    パイプラインの構成を変更したい場合は、既存のパイプラインの更新を参照してください。

    1. Google GKE 用の Helm チャート values ファイルをダウンロードします。
    2. Select API key をクリックして、使用する Datadog API キーを選択します。
    3. Datadog チャートリポジトリを Helm に追加します。
      helm repo add datadog https://helm.datadoghq.com
      
      すでに Datadog チャートリポジトリをお持ちの場合は、以下のコマンドを実行し、リポジトリが最新であることを確認してください。
      helm repo update
      
    4. UI で提供されるコマンドを実行して Worker をインストールします。コマンドには、先ほど入力した環境変数が自動的に入力されます。
      helm upgrade --install opw \
      -f google_gke.yaml \
      --set datadog.apiKey=<DATADOG_API_KEY> \
      --set datadog.pipelineId=<PIPELINE_ID> \
      --set <SOURCE_ENV_VARIABLES> \
      --set <DESTINATION_ENV_VARIABLES> \
      --set service.ports[0].protocol=TCP,service.ports[0].port=<SERVICE_PORT>,service.ports[0].targetPort=<TARGET_PORT> \
      datadog/observability-pipelines-worker
      
      : デフォルトでは、Kubernetes サービスは、受信ポート<SERVICE_PORT> を Worker がリッスンしているポート (<TARGET_PORT>) にマッピングします。Worker のポッドポートを Kubernetes サービスの別の受信ポートにマッピングしたい場合は、コマンドで以下の service.ports[0].port および service.ports[0].targetPort の値を使用します。
      --set service.ports[0].protocol=TCP,service.ports[0].port=8088,service.ports[0].targetPort=8282
      
    5. Observability Pipelines のインストールページに戻り、Deploy をクリックします。

    パイプラインの構成を変更したい場合は、既存のパイプラインの更新を参照してください。

    1. Click Select API key to choose the Datadog API key you want to use.

    2. Run the one-step command provided in the UI to install the Worker.

      Note: The environment variables used by the Worker in /etc/default/observability-pipelines-worker are not updated on subsequent runs of the install script. If changes are needed, update the file manually and restart the Worker.

    If you prefer not to use the one-line installation script, follow these step-by-step instructions:

    1. Set up APT transport for downloading using HTTPS:
      sudo apt-get update
      sudo apt-get install apt-transport-https curl gnupg
      
    2. Run the following commands to set up the Datadog deb repo on your system and create a Datadog archive keyring:
      sudo sh -c "echo 'deb [signed-by=/usr/share/keyrings/datadog-archive-keyring.gpg] https://apt.datadoghq.com/ stable observability-pipelines-worker-2' > /etc/apt/sources.list.d/datadog-observability-pipelines-worker.list"
      sudo touch /usr/share/keyrings/datadog-archive-keyring.gpg
      sudo chmod a+r /usr/share/keyrings/datadog-archive-keyring.gpg
      curl https://keys.datadoghq.com/DATADOG_APT_KEY_CURRENT.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
      curl https://keys.datadoghq.com/DATADOG_APT_KEY_06462314.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
      curl https://keys.datadoghq.com/DATADOG_APT_KEY_F14F620E.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
      curl https://keys.datadoghq.com/DATADOG_APT_KEY_C0962C7D.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
      
    3. Run the following commands to update your local apt repo and install the Worker:
      sudo apt-get update
      sudo apt-get install observability-pipelines-worker datadog-signing-keys
      
    4. Add your keys, site (for example, datadoghq.com for US1), source, and destination environment variables to the Worker’s environment file:
      sudo cat &lt;<EOF > /etc/default/observability-pipelines-worker
      DD_API_KEY=<DATADOG_API_KEY>
      DD_OP_PIPELINE_ID=<PIPELINE_ID>
      DD_SITE=<DATADOG_SITE>
      <SOURCE_ENV_VARIABLES>
      <DESTINATION_ENV_VARIABLES>
      EOF
      
    5. Start the worker:
      sudo systemctl restart observability-pipelines-worker
      

    See Update Existing Pipelines if you want to make changes to your pipeline’s configuration.

    For RHEL and CentOS, the Observability Pipelines Worker supports versions 8.0 or later.
    1. Click Select API key to choose the Datadog API key you want to use.

    2. Run the one-step command provided in the UI to install the Worker.

      Note: The environment variables used by the Worker in /etc/default/observability-pipelines-worker are not updated on subsequent runs of the install script. If changes are needed, update the file manually and restart the Worker.

    If you prefer not to use the one-line installation script, follow these step-by-step instructions:

    1. Set up the Datadog rpm repo on your system with the below command. Note: If you are running RHEL 8.1 or CentOS 8.1, use repo_gpgcheck=0 instead of repo_gpgcheck=1 in the configuration below.
      cat &lt;<EOF > /etc/yum.repos.d/datadog-observability-pipelines-worker.repo
      [observability-pipelines-worker]
      name = Observability Pipelines Worker
      baseurl = https://yum.datadoghq.com/stable/observability-pipelines-worker-2/\$basearch/
      enabled=1
      gpgcheck=1
      repo_gpgcheck=1
      gpgkey=https://keys.datadoghq.com/DATADOG_RPM_KEY_CURRENT.public
          https://keys.datadoghq.com/DATADOG_RPM_KEY_B01082D3.public
      EOF
      
    2. Update your packages and install the Worker:
      sudo yum makecache
      sudo yum install observability-pipelines-worker
      
    3. Add your keys, site (for example, datadoghq.com for US1), source, and destination environment variables to the Worker’s environment file:
      sudo cat &lt;&lt;-EOF > /etc/default/observability-pipelines-worker
      DD_API_KEY=<API_KEY>
      DD_OP_PIPELINE_ID=<PIPELINE_ID>
      DD_SITE=<SITE>
      <SOURCE_ENV_VARIABLES>
      <DESTINATION_ENV_VARIABLES>
      EOF
      
    4. Start the worker:
      sudo systemctl restart observability-pipelines-worker
      
    5. Navigate back to the Observability Pipelines installation page and click Deploy.

    See Update Existing Pipelines if you want to make changes to your pipeline’s configuration.

    1. ドロップダウンのオプションを 1 つ選択し、パイプラインで予想されるログの量を入力します。

      オプション説明
      Unsureログの量を予想できない場合、または Worker をテストしたい場合は、このオプションを使用します。このオプションは、最大 2 つの汎用 t4g.large インスタンスで EC2 オートスケーリンググループをプロビジョニングします。
      1-5 TB/dayこのオプションは、最大 2 つのコンピュート最適化インスタンス c6g.large で EC2 オートスケーリンググループをプロビジョニングします。
      5-10 TB/dayこのオプションは、最低 2 つ、最大 5 つのコンピュート最適化インスタンス c6g.large で EC2 オートスケーリンググループをプロビジョニングします。
      >10 TB/dayDatadog は大規模な本番デプロイでこのオプションを推奨しています。このオプションは、最低 2 つ、最大 10 個のコンピュート最適化インスタンス c6g.xlarge で EC2 オートスケーリンググループをプロビジョニングします。

      : その他のパラメーターは、すべて Worker デプロイメントに適したデフォルト値に設定されていますが、スタックを作成する前に AWS コンソールで必要に応じてユースケースに合わせて調整できます。

    2. Worker のインストールに使用する AWS リージョンを選択します。

    3. Select API key をクリックして、使用する Datadog API キーを選択します。

    4. Launch CloudFormation Template をクリックして AWS コンソールに移動し、スタックの構成を確認してから起動します。CloudFormation パラメーターが想定通りであることを確認してください。

    5. Worker のインストールに使用する VPC とサブネットを選択します。

    6. IAM の必要な権限のチェックボックスを見直して確認します。Submit をクリックしてスタックを作成します。ここでは、CloudFormation がインストールを処理し、Worker インスタンスが起動され、必要なソフトウェアがダウンロードされ、Worker が自動的に開始します。

    7. Observability Pipelines のインストールページに戻り、Deploy をクリックします。

    パイプラインの構成を変更したい場合は、既存のパイプラインの更新を参照してください。