AWS

개요

Amazon Web Services(AWS)에 연결하면 다음이 가능해집니다.

  • 이벤트 탐색기에서 자동 AWS 상태 업데이트 보기
  • Agent 설치 없이 EC2 호스트의 클라우드와치(CloudWatch) 메트릭 수집
  • EC2 호스트에 EC2 고유 정보를 태그 지정
  • EC2의 일정이 설정된 점검 이벤트를 스트림에 표시
  • 다양한 기타 AWS 제품에서 클라우드와치(CloudWatch) 메트릭 및 이벤트 수집
  • 이벤트 탐색기에서 클라우드와치(CloudWatch) 알람 보기

AWS를 통합해 빠르게 시작하는 방법을 알아보려면 AWS 시작하기 가이드를 참조하세요.

Datadog의 Amazon Web Services 통합은 90일 이상의 AWS 서비스 기간 동안 클라우드와치(CloudWatch)의 모든 메트릭, 이벤트와 로그를 수집합니다.

설정

다음 방법 중 하나를 사용해 메트릭, 이벤트, 태그 및 로그 수집을 위해 Datadog에 AWS 계정을 통합합니다.

자동

Datadog US1-FED 사이트를 사용하는 경우 이 통합은 액세스 키로 설정해야 합니다. AWS 수동 설정 가이드의 단계를 따르세요.

수동

  • 역할 위임 역할 위임을 사용해 수동으로 AWS 통합을 설정하려면 수동 설정 가이드를 참조하세요.

  • 액세스 키(GovCloud 또는 중국* 전용) 액세스 키를 사용해 AWS 통합을 설정하려면 수동 설정 가이드를 참조하세요.

    ** 중국 본토 (또는 중국 본토 내 환경과 연결된) Datadog 서비스의 모든 사용에는 웹 사이트 제한된 서비스 위치에서 게시된 법적 고지 사항의 적용을 받습니다.

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 resource collection, attach AWS’s managed SecurityAudit Policy to your Datadog IAM role.

로그 수집

Datadog로 AWS 서비스 로그를 전송하는 방법에는 두 가지가 있습니다.

  • Amazon Data Firehose 목적지: Amazon Data Firehose 전송 스트림에서 Datadog에 로그를 전달하는 데 Datadog 목적지를 사용하세요. 클라우드와치(CloudWatch)에서 매우 많은 로그를 전송할 때 이 접근 방식이 권장됩니다.
  • 포워더(Forwarder) 람다 함수: Datadog의 포워더(Forwarder) 람다 함수를 배포합니다. 해당 함수는 S3 버킷 또는 클라우드와치(CloudWatch) 로그 그룹에 구독되어 로그를 Datadog에 전달합니다. 또한 Datadog는 Amazon Data Firehose에 직접 데이터를 스트림할 수 없는 기타 리소스나 S3에서 로그를 전송하는 경우 이 접근 방식을 사용할 것을 권장합니다.

메트릭 수집

Datadog로 AWS 메트릭을 전송하는 방법은 두 가지가 있습니다.

  • 메트릭 폴링: API 폴링은 AWS 통합을 통해 즉시 사용 가능합니다. 클라우드와치(CloudWatch) API는 메트릭별 수집 기능을 통해 데이터를 풀링하여 Datadog에 전송합니다. 평균적으로 10분마다 새로운 메트릭이 풀링됩니다.
  • Amazon Data Firehose를 사용한 메트릭 메트릭 스트림: Amazon 클라우드와치(CloudWatch) 메트릭 스트림 및 Amazon Data Firehose를 사용해 메트릭을 확인할 수 있습니다. 참고: 이 방법은 2~3분의 지연이 있으며 별도의 설정이 필요합니다.

비용 제어를 위해 특정 리소스를 제외하려면 옵션에 대해 AWS 통합 빌링 페이지를 참조하세요.

리소스 수집

일부 Datadog 제품은 AWS 리소스(S3 버킷, RDS 스냅샷, CloudFront 분포 등)가 설정되는 방법에 대한 정보를 활용합니다. Datadog는 AWS 계정에 읽기 전용 API 호출을 함으로써 이러한 정보를 수집합니다.

AWS 보안 감사 정책

리소스 수집을 사용하고, AWS 관리형 SecurityAudit 정책을 Datadog IAM 역할을 추가합니다.

참고: 리소스 수집을 활성화했지만 Datadog IAM 역할에 추가된 AWS Security Audit Policy가 없는 경우 Datadog의 AWS 통합 타일에 경고 메시지가 표시됩니다.

클라우드 보안 관리

설정

AWS 계정에 대해 설정된 AWS 통합이 없는 경우 위에서 설정 프로세스를 완료합니다. 언급 시 Cloud Security Management를 활성화했는지 확인하세요.

참고: 이 기능을 사용하려면 AWS 통합에 역할 위임이 설정되어 있어야 합니다.

Cloud Security Management를 기존 AWS 통합에 추가하려면, 아래 단계를 따라 리소스 수집을 활성화하세요.

  1. 자동 or 수동 단계를 사용해 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. 아래에서 두 가지 확인 사항에 확인 표시하고 Update stack을 클릭합니다.

    수동 - Datadog AWS IAM 역할에 AWS 관리형 SecurityAudit 정책을 추가합니다. AWS 콘솔에서 이 정책을 찾을 수 있습니다.

  2. 아래 단계에 따라 Datadog AWS 통합 페이지에서 설정을 완료하세요. 대신 AWS 통합 업데이트 API를 사용할 수도 있습니다.

    1. 리소스 수집을 활성화할 AWS 계정을 클릭하세요.
    2. 해당 계정의 리소스 수집 탭으로 이동하여 Cloud Security Posture Management Collection을 활성화하세요.
    3. 페이지 오른쪽 하단에서 Save를 클릭하세요.

경고 수집

Datadog 이벤트 탐색기에 AWS 클라우드와치(CloudWatch) 알람을 전송하는 두 가지 방법이 있습니다.

  • 알람 폴링: 알람 폴링은 AWS 통합에서 즉시 사용 가능하며 DescribeAlarmHistory API를 통해 메트릭 알람을 전송합니다. 이 방법을 따르면 알림이 Amazon Web Services 이벤트 소스 아래에 분류됩니다. 참고: 크롤러는 컴포짓(composite) 알람을 수집하지 않습니다. 참고: 크롤러는 컴포짓(composite) 알람을 수집하지 않습니다.
  • SNS 주제: 알람을 SNS 주제에 구독하여 이벤트 탐색기에서 모든 AWS 클라우드와치(CloudWatch) 알람을 확인할 수 있습니다. 그런 다음 SNS 메시지를 Datadog에 전달합니다. 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 태그 키
전체region
API 게이트웨이apiid, apiname, method, resource, stage
앱 러너instance, serviceid, servicename
자동 스케일링autoscalinggroupname, autoscaling_group
빌링account_id, budget_name, budget_type, currency, servicename, time_unit
CloudFrontdistributionid
CodeBuildproject_name
CodeDeployapplication, creator, deployment_config, deployment_group, deployment_option, deployment_type, status
DirectConnectconnectionid
DynamoDBglobalsecondaryindexname, operation, streamlabel, tablename
EBSvolumeid, volume-name, volume-type
EC2autoscaling_group, availability-zone, image, instance-id, instance-type, kernel, name, security_group_name
ECSclustername, servicename, instance_id
EFSfilesystemid
ElastiCachecachenodeid, cache_node_type, cacheclusterid, cluster_name, engine, engine_version, preferred_availability-zone, replication_group
ElasticBeanstalkenvironmentname, enviromentid
ELBavailability-zone, hostname, loadbalancername, name, targetgroup
EMRcluster_name, jobflowid
ESdedicated_master_enabled, ebs_enabled, elasticsearch_version, instance_type, zone_awareness_enabled
Firehosedeliverystreamname
FSxfilesystemid, filesystemtype
Healthevent_category, status, service
IoTactiontype, protocol, rulename
Kinesisstreamname, name, state
KMSkeyid
람다functionname, resource, executedversion, memorysize, runtime
머신 러닝mlmodelid, requestmode
MQbroker, queue, topic
OpsWorksstackid, layerid, instanceid
Pollyoperation
RDSauto_minor_version_upgrade, dbinstanceclass, dbclusteridentifier, dbinstanceidentifier, dbname, engine, engineversion, hostname, name, publicly_accessible, secondary_availability-zone
RDS 프록시proxyname, target, targetgroup, targetrole
Redshiftclusteridentifier, latency, nodeid, service_class, stage, wlmid
Route 53healthcheckid
S3bucketname, filterid, storagetype
SES태그 키는 AWS에서 커스텀 설정됩니다.
SNStopicname
SQSqueuename
VPCnategatewayid, vpnid, tunnelipaddress
WorkSpacesdirectoryid, workspaceid

서비스 점검

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

트러블슈팅

AWS 통합 트러블슈팅 가이드를 참조해 AWS 통합과 관련된 문제를 해결하세요.

참고 자료