概要

AWS WAF は、一般的な Web エクスプロイトから Web アプリケーションを保護するために役立つ Web アプリケーションファイアウォールです。

このインテグレーションを有効にすると、WAF メトリクスを Datadog に表示できます。

セットアップ

インストール

Amazon Web Services インテグレーションをまだセットアップしていない場合は、最初にセットアップします。

メトリクスの収集

  1. AWS インテグレーションページで、使用しているエンドポイントに応じて、Metric Collection タブで WAF または WAFV2 が有効になっていることを確認します。

  2. Datadog - AWS WAF インテグレーションをインストールします。

ログ収集

Web Application Firewall 監査ログを有効にして、Web ACL で分析されたトラフィックに関する詳細情報を取得します。

WAF

  1. aws-waf-logs- から始まる名前で Amazon Data Firehose を作成します。
  2. Amazon Data Firehose の送信先で Amazon S3 を選択し、waf をプレフィックスとして必ず追加してください。
  3. Select the desired web ACL and configure it to send logs to the newly created Firehose (detailed steps).

WAFV2

  1. Create an S3 bucket with a name starting with aws-waf-logs-.
  2. Configure the logging destination for the Amazon S3 bucket (detailed steps).

The WAF/WAFV2 logs are collected and sent to the specified S3 bucket.

ログを Datadog に送信する方法

  1. If you haven’t already, set up the Datadog Forwarder Lambda function.
  2. Lambda 関数がインストールされたら、AWS コンソールで WAF ログを含む S3 バケットに手動でトリガーを追加します。Lambda で、トリガーリストから S3 をクリックします。
    S3 トリガーコンフィギュレーション
    WAF ログを含む S3 バケットを選択してトリガーを構成し、イベントタイプを Object Created (All) に変更して、Add ボタンをクリックします。
    S3 Lambda トリガーコンフィギュレーション

: Datadog Lambda Forwarder は、WAF ログのネストされたオブジェクトの配列を、使いやすいように自動的に key:value 形式に変換します。

データ収集

メトリクス

aws.waf.allowed_requests
(count)
The number of allowed web requests.
Shown as request
aws.waf.blocked_requests
(count)
The number of blocked web requests.
Shown as request
aws.waf.counted_requests
(count)
The number of counted web requests.
Shown as request
aws.waf.passed_requests
(gauge)
The number of passed web requests.
Shown as request
aws.wafv2.allowed_requests
(count)
The number of allowed web requests.
Shown as request
aws.wafv2.blocked_requests
(count)
The number of blocked web requests.
Shown as request
aws.wafv2.counted_requests
(count)
The number of counted web requests.
Shown as request
aws.wafv2.passed_requests
(count)
The number of passed web requests.
Shown as request
waf.allowed_requests
(count)
The number of allowed web requests.
Shown as request
waf.blocked_requests
(count)
The number of blocked web requests.
Shown as request
waf.counted_requests
(count)
The number of counted web requests.
Shown as request
waf.passed_requests
(count)
The number of passed web requests.
Shown as request

: WAF の CloudWatch メトリクス API の履歴形式により、aws.waf.*waf.* の両メトリクスが報告されます。

AWS から取得される各メトリクスには、ホスト名やセキュリティ グループなど、AWS コンソールに表示されるのと同じタグが割り当てられます。

イベント

AWS WAF インテグレーションには、イベントは含まれません。

サービスチェック

AWS WAF インテグレーションには、サービスのチェック機能は含まれません。

トラブルシューティング

ご不明な点は、Datadog のサポートチームまでお問い合わせください。

PREVIEWING: evan.li/clarify-agentless