概要

Amazon Virtual Private Cloud (Amazon VPC) を使用すると、仮想ネットワーク内で AWS リソースを起動できます。VPC フローログは、VPC 内のネットワークインターフェイスを行き来する IP トラフィックに関する情報をキャプチャできる機能です。

計画と使用

インフラストラクチャーリスト

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

メトリクスの収集

aws.vpc.flowlogs.* 以外の Amazon VPC メトリクスを収集するための追加の手順は必要ありません。aws.vpc.flowlogs.* で始まるメトリクスは、Datadog VPC Flow Logs インテグレーションによって生成されます。フローログメトリクスの収集を有効にする方法については、ログ収集セクションを参照してください。

aws.vpc.subnet.* メトリクスについては Datadog サポートにお問い合わせいただき、お使いのアカウントでの収集を有効化してください。

収集データ

VPC フローのログの送信先リソースをAWSで探す、または作成する

VPC フローログは、Datadog に送信する前に、まず中間送信先に送信する必要があります。Amazon Data Firehose に直接送ることもできますし、S3 バケットや CloudWatch Log グループに保存することも可能です。

VPC フローログを Datadog に送信する場合、運用のオーバーヘッドが少なく、費用対効果が期待できる Amazon Data Firehose がおすすめです。詳しくは Amazon VPC Flow Logs to Kinesis Data Firehose のご紹介をお読みください。

  1. 以下を新規で作成するか、既存のものを選択します。
    • Amazon Data Firehose (推奨)。Datadog にログを送信するための既存の Amazon Data Firehose の配信ストリームがない場合は、Datadog Amazon Firehose Destination で AWS サービスのログを送信するガイドの手順に従って作成してください。注: VPC とは別の AWS アカウントで、ログ収集と配信を一元化するための配信ストリームをオプションで選択することができます。
    • S3 バケットまたはフォルダのパス。
    • CloudWatch Log グループ。

: Lambda が自動的に vpc ソースをログにタグ付けするようにするには、S3 パス名または CloudWatch ロググループ名のプレフィックスとして vpc を指定します。

VPC フローログ記録の有効化

  1. AWS コンソールで、監視したい VPC に移動します。
  2. Flow logs タブに移動します。
  3. Create flow log をクリックします。
  4. All フィルターを選択すると、受け入れた接続と拒否した接続の両方を取得することができます。
  5. ログの保存先の種類 (Amazon Data Firehose、S3 バケット、CloudWatch ロググループ) を選択します。
  6. 送信先リソースの詳細を入力します。
  7. Create flow log をクリックします。

ログを Datadog に送信する方法

Amazon Data Firehose を保存先として選択した場合は、設定はこれで完了です。

S3 バケットまたは CloudWatch のロググループを保存先として選択した場合

  1. AWS アカウントで Datadog Forwarder Lambda 関数をまだセットアップしていない場合は、セットアップします。
  2. 設定したら、Datadog Forwarder Lambda 関数に移動します。Function Overview セクションで、Add Trigger をクリックします。
  3. Trigger Configuration で S3 または CloudWatch Logs トリガーを選択します。
  4. VPC のログが含まれる S3 バケットまたは CloudWatch のロググループを選択します。
  5. S3 の場合、イベントタイプは All object create events のままにしておきます。
  6. Add をクリックすると、Lambda にトリガーが追加されます。

ログエクスプローラーに移動して、ログを確認します。

AWS Services のログを収集する方法については、Datadog Lambda 関数で AWS Services のログを送信するを参照してください。

Datadog Operator

データセキュリティ

aws.transitgateway.bytes_in
(count)
The number of bytes received by the transit gateway.
Shown as byte
aws.transitgateway.bytes_out
(count)
The number of bytes sent from the transit gateway.
Shown as byte
aws.transitgateway.packet_drop_count_blackhole
(count)
The number of packets dropped because they matched a blackhole route.
Shown as packet
aws.transitgateway.packet_drop_count_no_route
(count)
The number of packets dropped because they did not match a route.
Shown as packet
aws.transitgateway.packets_in
(count)
The number of packets received by the transit gateway.
Shown as packet
aws.transitgateway.packets_out
(count)
The number of packets sent by the transit gateway.
Shown as packet
aws.vpc.flowlogs.action
(count)
ACCEPT or REJECT if the traffic was permitted or not by the securtiy groups or network ACLs
aws.vpc.flowlogs.bytes.per_request.max
(gauge)
The maximum number of bytes transferred per request during the capture window
Shown as byte
aws.vpc.flowlogs.bytes.per_request.median
(gauge)
The median number of bytes transferred per request during the capture window
Shown as byte
aws.vpc.flowlogs.bytes.per_request.min
(gauge)
The minimum number of bytes transferred per request during the capture window
Shown as byte
aws.vpc.flowlogs.bytes.per_request.p90
(gauge)
The 90th percentile number of bytes transferred per request during the capture window
Shown as byte
aws.vpc.flowlogs.bytes.per_request.p95
(gauge)
The 95th percentile number of bytes transferred per request during the capture window
Shown as byte
aws.vpc.flowlogs.bytes.per_request.p99
(gauge)
The 99th percentile number of bytes transferred per request during the capture window
Shown as byte
aws.vpc.flowlogs.bytes.total
(count)
The total number of bytes transferred during the capture window
Shown as byte
aws.vpc.flowlogs.duration.per_request.max
(gauge)
The maximum duration per request during the capture window
Shown as second
aws.vpc.flowlogs.duration.per_request.median
(gauge)
The median duration per request during the capture window
Shown as second
aws.vpc.flowlogs.duration.per_request.min
(gauge)
The minimum duration per request during the capture window
Shown as second
aws.vpc.flowlogs.duration.per_request.p90
(gauge)
The 90th percentile duration per request during the capture window
Shown as second
aws.vpc.flowlogs.duration.per_request.p95
(gauge)
The 95th percentile duration per request during the capture window
Shown as second
aws.vpc.flowlogs.duration.per_request.p99
(gauge)
The 99th percentile duration per request during the capture window
Shown as second
aws.vpc.flowlogs.log_status
(count)
The logging status of the flow log: OK NODATA or SKIPDATA
aws.vpc.flowlogs.packets.per_request.max
(gauge)
The maximum number of packets transferred per request during the capture window
Shown as packet
aws.vpc.flowlogs.packets.per_request.median
(gauge)
The median number of packets transferred per request during the capture window
Shown as packet
aws.vpc.flowlogs.packets.per_request.min
(gauge)
The minimum number of packets transferred per request during the capture window
Shown as packet
aws.vpc.flowlogs.packets.per_request.p90
(gauge)
The 90th percentile number of packets transferred per request during the capture window
Shown as packet
aws.vpc.flowlogs.packets.per_request.p95
(gauge)
The 95th percentile number of packets transferred per request during the capture window
Shown as packet
aws.vpc.flowlogs.packets.per_request.p99
(gauge)
The 99th percentile number of packets transferred per request during the capture window
Shown as packet
aws.vpc.flowlogs.packets.total
(count)
The total number of packets transferred during the capture window
Shown as packet
aws.vpc.subnet.available_ip_address_count
(gauge)
The number of available IP addresses in the subnet
aws.vpc.subnet.total_ip_address_count
(gauge)
The total number of IP addresses contained within the subnet

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

ヘルプ

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

ヘルプ

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

ヘルプ

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

その他の参考資料