Datadog のログを収集する

以下でサポートされています。

このドキュメントでは、Datadog ログを Google Security Operations に取り込む方法について説明します。Datadog は、アプリケーション、インフラストラクチャ、クラウド サービスから指標、トレース、ログを収集するクラウドベースのモニタリングおよび分析プラットフォームです。Cloud Storage または Webhook を使用して、Datadog ログを Google SecOps と共有できます。

始める前に

次の前提条件を満たしていることを確認します。

  • Google SecOps インスタンス
  • Datadog への特権ユーザー アクセス
  • Google Cloud コンソールへのアクセス(API キーの作成または Cloud Storage の構成用)

オプション 1: Cloud Storage 構成による Datadog ログの共有

Google Cloudとの Datadog のインテグレーションを構成する

Datadog とGoogle Cloud の統合を設定します。詳細については、Datadog Google Cloud 統合の設定をご覧ください。

Cloud Storage バケットを作成する

  1. Google Cloud コンソールにログインします。
  2. [Cloud Storage バケット] のページに移動します。

    [バケット] に移動

  3. [作成] をクリックします。

  4. [バケットの作成] ページでユーザーのバケット情報を入力します。以下のステップでは、操作を完了した後に [続行] をクリックして、次のステップに進みます。

    1. [始める] セクションで、次の操作を行います。

      1. バケット名の要件を満たす一意の名前を入力します(例: datadog-data)。
      2. 階層名前空間を有効にするには、展開矢印をクリックして [Optimize for file oriented and data-intensive workloads] セクションを開き、[このバケットで階層的な名前空間を有効にする] を選択します。

      3. バケットラベルを追加するには、展開矢印をクリックして [ラベル] セクションを開きます。

      4. [ラベルを追加] をクリックし、ラベルのキーと値を指定します。

    2. [データの保存場所の選択] セクションで、次の操作を行います。

      1. ロケーション タイプを選択してください。
      2. ロケーション タイプのプルダウン メニューを使用して、バケット内のオブジェクト データが永続的に保存されるロケーションを選択します。
    3. [データのストレージ クラスを選択する] セクションで、バケットのデフォルトのストレージ クラスを選択します。あるいは、Autoclass を選択して、バケットデータのストレージ クラスを自動的に管理します。

    4. [オブジェクトへのアクセスを制御する方法を選択する] セクションで、[なし] を選択して公開アクセスの防止を適用し、バケットのオブジェクトのアクセス制御モデルを選択します。

    5. [オブジェクト データを保護する方法を選択する] セクションで、次の操作を行います。

      1. [データ保護] で、バケットに設定するオプションを選択します。
      2. オブジェクト データの暗号化方法を選択するには、[データ暗号化] というラベルの付いた展開矢印をクリックし、データの暗号化方法を選択します。
  5. [作成] をクリックします。

Google Cloud サービス アカウントを作成する

  1. [IAM と管理] > [サービス アカウント] に移動します。
  2. 新しいサービス アカウントを作成する。
  3. わかりやすい名前を付けます(datadog-user など)。
  4. 前の手順で作成した Cloud Storage バケットに対する ストレージ オブジェクト管理者のロールをサービス アカウントに付与します。
  5. サービス アカウントのキーを作成し、キータイプとして JSON を選択します。
  6. サービス アカウントの JSON キーファイルをダウンロードします。このファイルは安全な場所に保管してください。

Cloud Storage にログを送信するように Datadog を構成する

  1. 特権アカウントを使用して Datadog にログインします。
  2. [ログ] > [ログ転送] に移動します。
  3. [+ Create New Archive] をクリックします。
  4. [Google Cloud Storage] を選択します。
  5. 必要なパラメータを入力し、[Save] をクリックします。

Cloud Storage バケットからログを取り込むように Google SecOps でフィードを構成する

  1. [SIEM 設定] > [フィード] に移動します。
  2. [Add New Feed] をクリックします。
  3. 次のページで [単一フィードを設定] をクリックします。
  4. [フィード名] フィールドに、フィードの名前を入力します(例: Datadog Logs GCS)。
  5. [ソースタイプ] として [Google Cloud Storage V2] を選択します。
  6. [ログタイプ] として [Datadog] を選択します。
  7. [サービス アカウントを取得する] をクリックして、このフィードの一意のサービス アカウントを取得します。
  8. このサービス アカウントに、前に作成した Cloud Storage バケットに対する ストレージ オブジェクト閲覧者ロールを付与します。
  9. [次へ] をクリックします。
  10. 次の入力パラメータの値を指定します。
    • Storage Bucket URI: gs://datadog-data 形式の Cloud Storage バケット URI。
    • Source deletion option: 必要に応じて削除オプションを選択します。
    • ファイルの最大経過日数: 指定した日数以内に変更されたファイルを含めます。デフォルトは 180 日です。
    • アセットの名前空間: アセットの名前空間
    • Ingestion labels: このフィードのイベントに適用されるラベル。
  11. [次へ] をクリックします。
  12. [Finalize] 画面でフィードの設定を確認し、[Submit] をクリックします。

オプション 2: Webhook 構成による Datadog ログの共有

フィードを設定する

フィードを構成する手順は次のとおりです。

  1. [SIEM 設定] > [フィード] に移動します。
  2. [Add New Feed] をクリックします。
  3. 次のページで [単一フィードを設定] をクリックします。
  4. [フィード名] フィールドに、フィードの名前を入力します(例: Datadog Logs)。
  5. [Source type] として [Webhook] を選択します。
  6. [ログタイプ] として [Datadog] を選択します。
  7. [次へ] をクリックします。
  8. 省略可: 次の入力パラメータの値を指定します。
    • Split delimiter: ログ行を区切るために使用される区切り文字(\n など)。
  9. [次へ] をクリックします。
  10. [Finalize] 画面でフィードの設定を確認し、[Submit] をクリックします。
  11. [秘密鍵を生成する] をクリックして、このフィードを認証するためのシークレット キーを生成します。
  12. 秘密鍵をコピーして保存します。この秘密鍵を再び表示することはできません。必要に応じて、新しい秘密鍵を再生成できますが、その場合以前の秘密鍵は無効になります。
  13. [詳細] タブで、[エンドポイント情報] フィールドから、フィードのエンドポイント URL をコピーします。 このエンドポイント URL をクライアント アプリケーション内で指定する必要があります。
  14. [完了] をクリックします。

Webhook フィード用の API キーを作成する

  1. Google Cloud コンソール > [認証情報] に移動します。[認証情報に移動] をクリックします。
  2. [認証情報を作成] をクリックして [API キー] を選択します。
  3. API キーのアクセスを Chronicle API に制限します。

エンドポイント URL を指定する

  1. クライアント アプリケーション内で、Webhook フィードで提供される HTTPS エンドポイント URL を指定します。
  2. 次の形式でカスタム ヘッダーの一部として API キーと秘密鍵を指定して、認証を有効にします。

    X-goog-api-key = API_KEY
    X-Webhook-Access-Key = SECRET
    

    推奨事項: API キーは URL 内ではなくヘッダーとして指定してください。

  3. Webhook クライアントがカスタム ヘッダーをサポートしていない場合は、次の形式のクエリ パラメータを使用して API キーと秘密鍵を指定できます。

    ENDPOINT_URL?key=API_KEY&secret=SECRET
    

    以下を置き換えます。

    • ENDPOINT_URL: フィード エンドポイントの URL。
    • API_KEY: Google Security Operations に対する認証に使用する API キー。
    • SECRET: フィードの認証用に生成した秘密鍵。

Webhook にログを送信するように Datadog を構成する

  1. 特権アカウントを使用して Datadog にログインします。
  2. [ログ] > [ログ転送] に移動します。
  3. [Custom Destinations] を選択します。
  4. [+ Create a New Destination] をクリックします。
  5. 次の入力パラメータの値を指定します。
    • 宛先の種類を選択: [HTTP] を選択します。
    • 宛先に名前を付ける: Webhook のわかりやすい名前を指定します(例: Google SecOps Webhook)。
    • 転送先を構成する: フィードの ENDPOINT_URL を貼り付けます。次のいずれかの認証オプションを選択します(両方は選択できません)。
      • オプション A(推奨): URL に認証情報を残し、API_KEYSECRET をカスタム ヘッダーとして渡します(次のステップで構成します)。
      • オプション B: 認証情報を ENDPOINT_URL?key=API_KEY&secret=SECRET 形式でクエリ パラメータとして URL に追加します。これは、クライアントがカスタム ヘッダーを送信できない場合にのみ使用します。
    • 認証設定を構成する: Datadog で宛先を保存するには、少なくとも 1 つの認証ヘッダーが必要です。次のヘッダーを追加します。Webhook エンドポイントはこれを無視するため、リクエストには影響しません。
      • ヘッダー名: Authorization
      • ヘッダー値: application/json
  6. [保存] をクリックします。

UDM マッピング テーブル

ログフィールド UDM マッピング ロジック
additional_field additional.fields 統合済み
anonymous_label additional.fields 統合済み
as_domain_label additional.fields 統合済み
as_name_label additional.fields 統合済み
as_number_label additional.fields 統合済み
as_type_label additional.fields 統合済み
auth_method_label additional.fields 統合済み
category_label additional.fields 統合済み
emitted_source_label additional.fields 統合済み
event_type_label additional.fields 統合済み
geo_continent_code_label additional.fields 統合済み
geo_continent_label additional.fields 統合済み
geo_continent_name_label additional.fields 統合済み
geo_country_code_label additional.fields 統合済み
geo_latitude_label additional.fields 統合済み
geo_longitude_label additional.fields 統合済み
geo_subdivision_code_label additional.fields 統合済み
geo_subdivision_name_label additional.fields 統合済み
geo_timezone_label additional.fields 統合済み
http_level_label additional.fields 統合済み
indicator_label additional.fields 統合済み
indicators_matched_label additional.fields 統合済み
infrastructure_label additional.fields 統合済み
intention_label additional.fields 統合済み
iso_code_label additional.fields 統合済み
new_template_variable_name_label additional.fields 統合済み
new_template_variable_preset_name_label additional.fields 統合済み
new_template_variable_value_label additional.fields 統合済み
new_widget_definition_background_color_label additional.fields 統合済み
new_widget_definition_layout_type_label additional.fields 統合済み
new_widget_definition_show_title_label additional.fields 統合済み
new_widget_definition_title_label additional.fields 統合済み
new_widget_definition_type_label additional.fields 統合済み
new_widget_id_label additional.fields 統合済み
new_widget_layout_height_label additional.fields 統合済み
new_widget_layout_width_label additional.fields 統合済み
new_widget_layout_x_label additional.fields 統合済み
new_widget_layout_y_label additional.fields 統合済み
record_attributes_asset_id_label additional.fields 統合済み
record_attributes_asset_name_label additional.fields 統合済み
record_attributes_asset_new_value_dashboard_definition_author_handle_label additional.fields 統合済み
record_attributes_asset_new_value_dashboard_definition_author_name_label additional.fields 統合済み
record_attributes_asset_new_value_dashboard_definition_description_label additional.fields 統合済み
record_attributes_asset_new_value_dashboard_definition_id_label additional.fields 統合済み
record_attributes_asset_new_value_dashboard_definition_reflow_type_label additional.fields 統合済み
record_attributes_asset_new_value_dashboard_definition_title_label additional.fields 統合済み
record_attributes_asset_new_value_dashboard_definition_url_label additional.fields 統合済み
record_attributes_asset_prev_value_dashboard_definition_author_handle_label additional.fields 統合済み
record_attributes_asset_prev_value_dashboard_definition_author_name_label additional.fields 統合済み
record_attributes_asset_prev_value_dashboard_definition_description_label additional.fields 統合済み
record_attributes_asset_prev_value_dashboard_definition_id_label additional.fields 統合済み
record_attributes_asset_prev_value_dashboard_definition_reflow_type_label additional.fields 統合済み
record_attributes_asset_prev_value_dashboard_definition_title_label additional.fields 統合済み
record_attributes_asset_prev_value_dashboard_definition_url_label additional.fields 統合済み
record_attributes_asset_type_label additional.fields 統合済み
record_attributes_contextMap_cfRay_label additional.fields 統合済み
record_attributes_contextMap_tradingAccountId_label additional.fields 統合済み
record_attributes_evt_name_label additional.fields 統合済み
record_attributes_network_client_geoip_as_number_label additional.fields 統合済み
record_attributes_network_client_geoip_as_type_label additional.fields 統合済み
record_attributes_network_client_geoip_location_latitude_label additional.fields 統合済み
record_attributes_network_client_geoip_location_longitude_label additional.fields 統合済み
record_attributes_network_client_geoip_subdivision_iso_code_label additional.fields 統合済み
record_attributes_network_client_geoip_subdivision_name_label additional.fields 統合済み
record_attributes_network_client_geoip_timezone_label additional.fields 統合済み
record_trace_id_label additional.fields 統合済み
request_id_label additional.fields 統合済み
risk_label additional.fields 統合済み
service_label additional.fields 統合済み
source_name_label additional.fields 統合済み
source_type_label additional.fields 統合済み
source_url_label additional.fields 統合済み
span_id_label additional.fields 統合済み
symbol_label additional.fields 統合済み
tag_label additional.fields 統合済み
template_variable_name_label additional.fields 統合済み
template_variable_preset_name_label additional.fields 統合済み
template_variable_value_label additional.fields 統合済み
timezone_label additional.fields 統合済み
tunnels_operator_label additional.fields 統合済み
tunnels_type_label additional.fields 統合済み
type_label additional.fields 統合済み
type_label1 additional.fields 統合済み
url_details_host_label additional.fields 統合済み
url_details_path_label additional.fields 統合済み
user_created_timestamp_label additional.fields 統合済み
widget_definition_background_color_label additional.fields 統合済み
widget_definition_layout_type_label additional.fields 統合済み
widget_definition_show_title_label additional.fields 統合済み
widget_definition_title_label additional.fields 統合済み
widget_definition_type_label additional.fields 統合済み
widget_id_label additional.fields 統合済み
widget_layout_height_label additional.fields 統合済み
widget_layout_width_label additional.fields 統合済み
widget_layout_x_label additional.fields 統合済み
widget_layout_y_label additional.fields 統合済み
eventMessage metadata.description 直接マッピングされます。
date1 metadata.event_timestamp ISO8601 として解析済み
record.date1 metadata.event_timestamp ISO8601 として解析済み
event_type metadata.event_type 直接マッピングされます。
has_principal metadata.event_type マッピング: trueNETWORK_CONNECTIONtrueSTATUS_UPDATE
has_user metadata.event_type マッピング: trueUSER_UNCATEGORIZED
attributes._trace.origin.operation metadata.product_event_type 直接マッピングされます。
eventType metadata.product_event_type 直接マッピングされます。
record_attributes_contextMap_eventType metadata.product_event_type 直接マッピングされます。
source metadata.product_event_type 直接マッピングされます。
_id metadata.product_log_id 直接マッピングされます。
record_attributes_thread_id metadata.product_log_id 直接マッピングされます。
threadID metadata.product_log_id 直接マッピングされます。
service metadata.product_name 直接マッピングされます。
attributes.@version metadata.product_version 直接マッピングされます。
attributes.http.method network.http.method 直接マッピングされます。
agnt network.http.parsed_user_agent 直接マッピングされます。
record_attributes_contextMap_userAgent network.http.parsed_user_agent 直接マッピングされます。
attributes.http.status_code network.http.response_code 名前変更/マッピング済み
agnt network.http.user_agent 直接マッピングされます。
attributes.http.useragent network.http.user_agent 直接マッピングされます。
record_attributes_contextMap_userAgent network.http.user_agent 直接マッピングされます。
attributes.logger_name principal.application 直接マッピングされます。
service principal.application 直接マッピングされます。
attributes._trace.baggage.device_id principal.asset.asset_id 直接マッピングされます。
attributes.metadata.host_metadata.hostname principal.asset.hostname 直接マッピングされます。
attributes.usr.id principal.asset.hostname 直接マッピングされます。
attributes.network.client.geoip.ipAddress principal.asset.ip 統合済み
attributes.network.client.ip principal.asset.ip 統合済み
ip1 principal.asset.ip 統合済み
ipAddress principal.asset.ip 直接マッピングされます。
principal_ip_address principal.asset.ip 統合済み
record_attributes_network_client_ip principal.asset.ip 統合済み
org principal.group.group_display_name 直接マッピングされます。
attributes.org.uuid principal.group.product_object_id 直接マッピングされます。
attributes.metadata.host_metadata.hostname principal.hostname 直接マッピングされます。
attributes.usr.id principal.hostname 直接マッピングされます。
host principal.hostname 直接マッピングされます。
record_host principal.hostname 直接マッピングされます。
attributes.network.client.geoip.ipAddress principal.ip 統合済み
attributes.network.client.ip principal.ip 統合済み
ip1 principal.ip 統合済み
ipAddress principal.ip 直接マッピングされます。
principal_ip_address principal.ip 統合済み
record_attributes_network_client_ip principal.ip 統合済み
record_attributes_http_url_details_host_label principal.labels 統合済み
record_attributes_http_url_details_path_label principal.labels 統合済み
record_attributes_http_useragent_label principal.labels 統合済み
record_attributes_network_client_geoip_as_domain_label principal.labels 統合済み
record_attributes_network_client_geoip_as_route_label principal.labels 統合済み
record_attributes_network_client_geoip_city_name_label principal.labels 統合済み
record_attributes_network_client_geoip_continent_code_label principal.labels 統合済み
record_attributes_network_client_geoip_continent_name_label principal.labels 統合済み
record_attributes_network_client_geoip_country_iso_code_label principal.labels 統合済み
record_attributes_network_client_geoip_country_name_label principal.labels 統合済み
record_attributes_usr_id_label principal.labels 統合済み
attributes.network.client.geoip.city.name principal.location.city 直接マッピングされます。
attributes.network.client.geoip.country.name principal.location.country_or_region 直接マッピングされます。
port principal.port 名前変更/マッピング済み
client_as_route_label principal.resource.attribute.labels 統合済み
client_type_label principal.resource.attribute.labels 統合済み
org_name_label principal.resource.attribute.labels 統合済み
record_attributes_usr_uuid_label principal.user.attribute.labels 統合済み
roles principal.user.attribute.roles 統合済み
attributes.usr.email principal.user.email_addresses 統合済み
email_id principal.user.email_addresses 統合済み
record_attributes_usr_email principal.user.email_addresses 統合済み
attributes.evt.actor.type principal.user.role_name 直接マッピングされます。
attributes.metadata.user_uuid principal.user.userid 直接マッピングされます。
attributes.usr.uuid principal.user.userid 直接マッピングされます。
record_attributes_contextMap_user principal.user.userid 直接マッピングされます。
user principal.user.userid 直接マッピングされます。
BusArch_label security_result.about.resource.attribute.labels 統合済み
CANDBVersion_label security_result.about.resource.attribute.labels 統合済み
alert_label security_result.about.resource.attribute.labels 統合済み
caller_label security_result.about.resource.attribute.labels 統合済み
component_label security_result.about.resource.attribute.labels 統合済み
esn_label security_result.about.resource.attribute.labels 統合済み
ftcpVersion_label security_result.about.resource.attribute.labels 統合済み
ingestMessageId_label security_result.about.resource.attribute.labels 統合済み
label security_result.about.resource.attribute.labels 統合済み
level_label security_result.about.resource.attribute.labels 統合済み
msg_label security_result.about.resource.attribute.labels 統合済み
query_label security_result.about.resource.attribute.labels 統合済み
redactedVin_label security_result.about.resource.attribute.labels 統合済み
updated_query_label security_result.about.resource.attribute.labels 統合済み
vehicleId_label security_result.about.resource.attribute.labels 統合済み
category1 security_result.category_details 統合済み
_id_label security_result.detection_fields 統合済み
action_label security_result.detection_fields 統合済み
org_uuid_label security_result.detection_fields 統合済み
record_attributes_http_method_label security_result.detection_fields 統合済み
record_message_label security_result.detection_fields 統合済み
record_source_label security_result.detection_fields 統合済み
record_status_label security_result.detection_fields 統合済み
status security_result.severity マッピング: "INFO", "DEBUG", "debug", "info"LOW(?i)WARNMEDIUM
status security_result.severity_details 直接マッピングされます。
context.AlertName security_result.threat_name 直接マッピングされます。
src_ip_address src.ip 統合済み
record_attributes_contextMap_dd_service target.application 直接マッピングされます。
target_ip_address target.asset.ip マッピング: ^(?:[0-9]{1,3}[.]){3}[0-9]{1,3}$target_ip_address
target_ip_address target.ip マッピング: ^(?:[0-9]{1,3}[.]){3}[0-9]{1,3}$target_ip_address
record_attributes_contextMap_dd_version target.platform_version 直接マッピングされます。
logger_fqcn_label target.resource.attribute.labels 統合済み
logger_label target.resource.attribute.labels 統合済み
modified_fields_label target.resource.attribute.labels 統合済み
asset_name target.resource.name 直接マッピングされます。
asset_id target.resource.product_object_id 直接マッピングされます。
asset_type target.resource.type 直接マッピングされます。
record_attributes_contextMap_dd_env target.resource.type 直接マッピングされます。
record_attributes_contextMap_userId target.user.userid 直接マッピングされます。
record_attributes_user target.user.userid 直接マッピングされます。
なし metadata.event_type 定数: NETWORK_CONNECTION
なし network.http.parsed_user_agent 定数: parseduseragent
なし security_result.severity 定数: LOW

さらにサポートが必要な場合 コミュニティ メンバーや Google SecOps のプロフェッショナルから回答を得ることができます。