概要

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 に統合し、メトリクス、イベント、タグ、ログを収集します。

自動

Datadog の US1-FED サイトを使用している場合、このインテグレーションはアクセスキーで構成する必要があります。AWS マニュアルセットアップガイドの手順に従ってください。

手動

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

  • アクセスキー (GovCloud または中国*のみ)
    アクセスキーを使用して AWS インテグレーションをセットアップするには、手動セットアップガイドをご覧ください。

    * 中国本土における (または中国本土内の環境に関連する) Datadog サービスの使用はすべて、当社 Web サイトのサービス制限地域セクションに掲載されている免責事項に従うものとします。

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サービスログを Datadog に送信する方法はいくつかあります。

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

メトリクスの収集

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

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

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

リソース収集

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

AWS セキュリティ監査ポリシー

リソースコレクションを使用するには、AWS の管理するセキュリティ監査ポリシーを Datadog IAM ロールに関連付けます。

: Datadog IAM ロールに AWS セキュリティ監査ポリシーが関連付けられていない状態でリソース収集を有効にすると、Datadog の AWS インテグレーションタイルに警告メッセージが表示されます。

Cloud Security Management

計画と使用

お使いの AWS アカウントで AWS インテグレーションの設定を行っていない場合は、上記の設定プロセスを完了させます。Cloud Security Management が有効化されていることを適宜ご確認ください。

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

既存の AWS インテグレーションに Cloud Security 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 サービスのドキュメントを参照してください。

Lambda のトレースされた起動の 1 時間単位使用量の取得

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

Datadog クリップボード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 インテグレーションのトラブルシューティングガイドをご参照ください。

その他の参考資料