概要

Amazon Web Services (AWS) を接続すると、次のことができるようになります。

  • イベントエクスプローラーで AWS ステータスの自動更新を確認する
  • Agent をインストールすることなく、EC2 ホストの CloudWatch メトリクスを取得する
  • EC2 ホストに EC2 固有の情報をタグ付けする
  • EC2 のスケジュール設定されたメンテナンス イベントをストリームに表示する
  • その他のさまざまな AWS 製品から CloudWatch メトリクスとイベントを収集する
  • イベントエクスプローラーで CloudWatch アラームを確認する

AWS インテグレーションをすぐに使い始めるには、AWS スタートガイド をご確認ください。

Datadog の Amazon Web Services インテグレーションは、90 以上の AWS サービス のログ、イベント、CloudWatch からの全メトリクス を収集します。

セットアップ

AWS のロール委任は、Datadog for Government site でサポートされていません。アクセスキーを使用する必要があります。

以下のいずれかの方法を使用して AWS アカウントを Datadog に統合し、メトリクス、イベント、タグ、ログを収集します。

自動

手動

  • ロールの委任
    AWS インテグレーションをロールの委任で手動設定する場合は、手動設定ガイド を参照してください。

  • アクセスキー (GovCloud または中国のみ)
    アクセスキーによる AWS インテグレーションを設定する場合は、手動設定ガイド を参照してください。

AWS IAM Permissions

AWS IAM permissions enable Datadog to collect metrics, tags, EventBridge events, and other data necessary to monitor your AWS environment.

To correctly set up the AWS Integration, you must attach the relevant IAM policies to the Datadog AWS Integration IAM Role in your AWS account.

AWS Integration IAM Policy

The set of permissions necessary to use all the integrations for individual AWS services.

The following permissions included in the policy document use wild cards such as List* and Get*. If you require strict policies, use the complete action names as listed and reference the Amazon API documentation for your respective services.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "apigateway:GET",
                "autoscaling:Describe*",
                "backup:List*",
                "budgets:ViewBudget",
                "cloudfront:GetDistributionConfig",
                "cloudfront:ListDistributions",
                "cloudtrail:DescribeTrails",
                "cloudtrail:GetTrailStatus",
                "cloudtrail:LookupEvents",
                "cloudwatch:Describe*",
                "cloudwatch:Get*",
                "cloudwatch:List*",
                "codedeploy:List*",
                "codedeploy:BatchGet*",
                "directconnect:Describe*",
                "dynamodb:List*",
                "dynamodb:Describe*",
                "ec2:Describe*",
                "ec2:GetTransitGatewayPrefixListReferences",
                "ec2:SearchTransitGatewayRoutes",
                "ecs:Describe*",
                "ecs:List*",
                "elasticache:Describe*",
                "elasticache:List*",
                "elasticfilesystem:DescribeFileSystems",
                "elasticfilesystem:DescribeTags",
                "elasticfilesystem:DescribeAccessPoints",
                "elasticloadbalancing:Describe*",
                "elasticmapreduce:List*",
                "elasticmapreduce:Describe*",
                "es:ListTags",
                "es:ListDomainNames",
                "es:DescribeElasticsearchDomains",
                "events:CreateEventBus",
                "fsx:DescribeFileSystems",
                "fsx:ListTagsForResource",
                "health:DescribeEvents",
                "health:DescribeEventDetails",
                "health:DescribeAffectedEntities",
                "kinesis:List*",
                "kinesis:Describe*",
                "lambda:GetPolicy",
                "lambda:List*",
                "logs:DeleteSubscriptionFilter",
                "logs:DescribeLogGroups",
                "logs:DescribeLogStreams",
                "logs:DescribeSubscriptionFilters",
                "logs:FilterLogEvents",
                "logs:PutSubscriptionFilter",
                "logs:TestMetricFilter",
                "organizations:Describe*",
                "organizations:List*",
                "rds:Describe*",
                "rds:List*",
                "redshift:DescribeClusters",
                "redshift:DescribeLoggingStatus",
                "route53:List*",
                "s3:GetBucketLogging",
                "s3:GetBucketLocation",
                "s3:GetBucketNotification",
                "s3:GetBucketTagging",
                "s3:ListAllMyBuckets",
                "s3:PutBucketNotification",
                "ses:Get*",
                "sns:List*",
                "sns:Publish",
                "sqs:ListQueues",
                "states:ListStateMachines",
                "states:DescribeStateMachine",
                "support:DescribeTrustedAdvisor*",
                "support:RefreshTrustedAdvisorCheck",
                "tag:GetResources",
                "tag:GetTagKeys",
                "tag:GetTagValues",
                "xray:BatchGetTraces",
                "xray:GetTraceSummaries"
            ],
            "Effect": "Allow",
            "Resource": "*"
        }
    ]
}

AWS Security Audit Policy

To use Cloud Security Posture Management, attach AWS’s managed SecurityAudit Policy to your Datadog IAM role.

ログの収集

AWSサービスログを Datadog に送信する方法はいくつかあります。

  • Kinesis Firehose destination : Kinesis Firehose 配信ストリームで Datadog の宛先を使用して、ログを Datadog に転送します。CloudWatch から非常に大量のログを送信する際は、このアプローチを使用することが推奨されます。
  • Forwarder Lambda 関数 : S3 バケットまたは CloudWatch ロググループにサブスクライブする Datadog Forwarder Lambda 関数をデプロイし、ログを Datadog に転送します。また、S3 またはデータを Kinesis に直接ストリーミングできないその他のリソースからログを送信する場合、Datadog ではこのアプローチを使用することをお勧めしています。

メトリクスの収集

メトリクスを Datadog に送信する方法は 2 つあります。

  • メトリクスのポーリング : AWS インテグレーションで利用できる API ポーリングです。CloudWatch API をメトリクス別にクロールしてデータを取得し、Datadog に送信します。新しいメトリクスの取得は平均 10 分毎に行われます。
  • Kinesis Firehose でのメトリクスストリーム : Amazon CloudWatch Metric Streams と Amazon Kinesis Data Firehose を使用してメトリクスを確認します。: このメソッドには 2 - 3 分のレイテンシーがあり、別途設定が必要となります。

コスト管理のために特定のリソースを除外するオプションについては、AWS Integration Billing ページ を参照してください。

リソース収集

一部の Datadog 製品は、AWS リソース (S3 バケット、RDS スナップショット、CloudFront ディストリビューションなど) の構成方法に関する情報を活用します。Datadog は、AWS アカウントに対して読み取り専用の API 呼び出しを行うことにより、この情報を収集します。

Cloud Security Posture Management

セットアップ

お使いの AWS アカウントで AWS インテグレーションの設定を行っていない場合は、上記の設定プロセス を完了させます。クラウドセキュリティポスチャ管理が有効化されていることを適宜ご確認ください。

注: この機能を使用するには、AWS インテグレーションにロールの委任を設定する必要があります。

既存の AWS インテグレーションに Cloud Security Posture Management を追加するには、以下の手順でリソース収集を有効にしてください。

  1. 自動または手動手順で Datadog IAM ロールに必要な権限を提供します。

    自動 - CloudFormation テンプレートを更新します。 a. CloudFormation コンソールで Datadog インテグレーションのインストールに使用した主要なスタックを探し、Update を選択します。 b. Replace current template を選択します。 c. Amazon S3 URL を選択して https://datadog-cloudformation-template.s3.amazonaws.com/aws/main.yaml を入力し、Next をクリックします。 d. CloudSecurityPostureManagementPermissionstrue に設定し、Next をクリックします。Review ページに到達するまでその他の既存のパラメーターは変更しないでください。ここで変更点をプレビューおよび確認します。 e. 下部にある 2 つの確認ボックスをオンにし、Update stack をクリックします。

    手動 - AWS が管理する SecurityAudit ポリシー を Datadog AWS IAM ロールにアタッチします。このポリシーは AWS コンソール にあります。

  2. Datadog AWS インテグレーションページ で、以下の手順で設定を完了させます。または、Update an AWS Integration API エンドポイントを利用することも可能です。

    1. リソース収集を有効化したい AWS アカウントをクリックします。
    2. そのアカウントの Resource collection タブに移動し、Cloud Security Posture Management Collection を有効にします。
    3. ページの右下にある Save をクリックします。

アラームの収集

AWS CloudWatch アラームを Datadog イベントエクスプローラーに送信する方法は 2 つあります。

  • アラームポーリング: アラームポーリングは AWS インテグレーションですぐに使用でき、DescribeAlarmHistory API を介してメトリクスアラームをフェッチします。この方法に従うと、イベントソース Amazon Web Services の下にアラームが分類されます。: クローラーは複合アラームを収集しません。
  • SNS トピック: アラームを SNS トピックにサブスクライブしてから、SNS メッセージを Datadog に転送することで、イベントエクスプローラー内のすべての AWS CloudWatch アラームを確認できます。Datadog でイベントとして SNS メッセージを受信する方法については、SNS メッセージの受信 を参照してください。この方法に従うと、イベントソース Amazon SNS の下にアラームが分類されます。

収集データ

メトリクス

aws.events.failed_invocations
(count)
Measures the number of invocations that failed permanently. This does not include invocations that are retried or that succeeded after a retry attempt
aws.events.invocations
(count)
Measures the number of times a target is invoked for a rule in response to an event. This includes successful and failed invocations but does not include throttled or retried attempts until they fail permanently.
aws.events.matched_events
(count)
Measures the number of events that matched with any rule.
aws.events.throttled_rules
(count)
Measures the number of triggered rules that are being throttled.
aws.events.triggered_rules
(count)
Measures the number of triggered rules that matched with any event.
aws.logs.delivery_errors
(count)
The number of log events for which CloudWatch Logs received an error when forwarding data to the subscription destination.
Shown as event
aws.logs.delivery_throttling
(count)
The number of log events for which CloudWatch Logs was throttled when forwarding data to the subscription destination.
Shown as event
aws.logs.forwarded_bytes
(gauge)
The volume of log events in compressed bytes forwarded to the subscription destination.
Shown as byte
aws.logs.forwarded_log_events
(count)
The number of log events forwarded to the subscription destination.
Shown as event
aws.logs.incoming_bytes
(gauge)
The volume of log events in uncompressed bytes uploaded to Cloudwatch Logs.
Shown as byte
aws.logs.incoming_log_events
(count)
The number of log events uploaded to Cloudwatch Logs.
Shown as event
aws.usage.call_count
(count)
The number of specified operations performed in your account
Shown as operation
aws.usage.resource_count
(count)
The number of specified resources in your account
Shown as resource

イベント

AWS からのイベントは、AWS サービス単位で収集されます。収集されるイベントの詳細については、お使いの AWS サービスのドキュメント を参照してください。

タグ

AWS インテグレーションにより以下のタグが収集されます。: 一部のタグは、特定のメトリクスにのみ表示されます。

インテグレーションDatadog タグキー
Allregion
API Gatewayapiid、apinamemethodresourcestage`
App Runnerinstanceserviceidservicename
Auto Scalingautoscalinggroupnameautoscaling_group
Billingaccount_idbudget_namebudget_typecurrencyservicenametime_unit
CloudFrontdistributionid
CodeBuildproject_name
CodeDeployapplicationcreatordeployment_configdeployment_groupdeployment_optiondeployment_typestatus
DirectConnectconnectionid
DynamoDBglobalsecondaryindexnameoperationstreamlabeltablename
EBSvolumeidvolume-namevolume-type
EC2autoscaling_groupavailability-zoneimageinstance-idinstance-typekernelnamesecurity_group_name
ECSclusternameservicenameinstance_id
EFSfilesystemid
ElastiCachecachenodeidcache_node_typecacheclusteridcluster_nameengineengine_versionpreferred_availability-zonereplication_group
ElasticBeanstalkenvironmentnameenviromentid
ELBavailability-zonehostnameloadbalancernamenametargetgroup
EMRcluster_namejobflowid
ESdedicated_master_enabledebs_enabledelasticsearch_versioninstance_typezone_awareness_enabled
Firehosedeliverystreamname
FSxfilesystemidfilesystemtype
Healthevent_categorystatusservice
IoTactiontypeprotocolrulename
Kinesisstreamnamenamestate
KMSkeyid
Lambdafunctionnameresourceexecutedversionmemorysizeruntime
Machine Learningmlmodelidrequestmode
MQbrokerqueuetopic
OpsWorksstackidlayeridinstanceid
Pollyoperation
RDSauto_minor_version_upgradedbinstanceclassdbclusteridentifierdbinstanceidentifierdbnameengineengineversionhostnamenamepublicly_accessiblesecondary_availability-zone
RDS Proxyproxynametargettargetgrouptargetrole
Redshiftclusteridentifierlatencynodeidservice_classstagewlmid
Route 53healthcheckid
S3bucketnamefilteridstoragetype
SESタグキーは AWS でカスタム設定されます。
SNStopicname
SQSqueuename
VPCnategatewayidvpnidtunnelipaddress
WorkSpacesdirectoryidworkspaceid

サービスのチェック

aws.status
Returns CRITICAL if one or more AWS regions are experiencing issues. Returns OK otherwise.
Statuses: ok, critical

トラブルシューティング

AWS インテグレーションに関する問題解決は、AWS インテグレーションのトラブルシューティングガイド をご参照ください。

その他の参考資料