개요
Amazon Web Services(AWS)에 연결하면 다음이 가능해집니다.
- 이벤트 스트림(Event Stream)으로 AWS 상태의 자동 업데이트를 확인
- Agent 설치 없이 EC2 호스트의 클라우드와치(CloudWatch) 메트릭 수집
- EC2 호스트에 EC2 고유 정보를 태그 지정
- EC2의 일정이 설정된 점검 이벤트를 스트림에 표시
- 다양한 기타 AWS 제품에서 클라우드와치(CloudWatch) 메트릭 및 이벤트 수집
- 이벤트 스트림(Event Stream)에 클라우드와치(CloudWatch) 경보 표시
AWS를 통합해 빠르게 시작하는 방법을 알아보려면 AWS 시작하기 가이드
를 참조하세요.
Datadog의 Amazon Web Services 통합은
클라우드와치(CloudWatch)에서 모든 메트릭을 수집하도록 설계되었습니다. Datadog는 계속해서 문서를 업데이트하여 모든 서브 통합을 표시하고자 최선을 다합니다. 다만 클라우드 서비스에서 빠르게 신규 메트릭 및 서비스를 출시하는 관계로, 통합 목록의 정리가 다소 늦어지는 경우가 종종 발생합니다.
구성
AWS 역할 위임은 Datadog for Government site에서 지원되지 않습니다.
액세스 키를 사용해야 합니다.
메트릭, 트레이스, 로그 수집을 위해 AWS 계정을 Datadog에 통합하려면 다음 방법을 활용하세요.
- 역할 위임(자동)
: CloudFormation 템플릿을 이용해 자동으로 필요한 AWS 역할을 구성합니다(권장).
- 역할 위임(수동)
: 직접 필요한 역할을 만들고 각각의 양식에 필수 자격증명 정보를 복사합니다.
- 액세스 키
: GovCloud 또는 중국에서만 사용합니다
필요한 AWS 역할 구성 방법을 선택하세요. CloudFormation을 권장합니다.
CloudFormation으로 AWS를 구성하려면 AWS 시작하기 가이드
를 참조하세요.
수동
AWS
- AWS IAM Console
에서 새 역할을 생성하세요.
- 역할 유형에서
Another AWS account
옵션을 선택하세요. - 계정 ID에서
464622532012
(Datadog의 계정 ID)를 입력하세요. 이를 통해 Datadog에 AWS 데이터의 읽기 전용 액세스 권한을 부여합니다. Require external ID
옵션을 선택하고 AWS 통합 타일
에서 생성된 것을 입력하세요. Require MFA를 비활성화했는지 확인하시기 바랍니다. 외부 ID를 자세히 알아보려면 IAM 사용자 가이드
를 참조하세요.Next: Permissions
를 클릭하세요.- 이미 정책을 생성했다면 본 페이지에서 찾아서 선택한 다음 12단계로 이동합니다. 아직 생성하지 않았다면
Create Policy
옵션을 클릭하세요. 새로운 창이 열립니다. JSON
탭을 선택합니다. 텍스트 상자 내 아래의 정책 스니펫
을 사용해 Datadog에서 제공하는 AWS 통합의 장점을 모두 누려보세요. 통합에 다른 컴포넌트가 추가된 경우에는 권한 허용 설정이 바뀔 수 있습니다.Next: Tags
및 Review policy
을(를) 클릭하세요.- 정책에
DatadogAWSIntegrationPolicy
또는 마음에 드는 이름을 지정하고, 적절한 설명을 입력하세요. Create policy
옵션을 클릭하면 창이 닫힙니다.- “역할 생성” 창으로 돌아와서, 정책 목록을 새로고침하고 방금 생성한 정책을 선택하세요.
- (선택 사항): AWS SecurityAudit Policy
를 역할에 추가해, Datadog의 Cloud Security Posture Management 제품
을 사용하는 데 필요한 권한을 허용할 수 있습니다.
Next: Tags
및 Next: Review
을(를) 클릭하세요.- 역할 이름을 지정하고(예:
DatadogAWSIntegrationRole
) 적절한 설명을 입력하세요. Create Role
옵션을 클릭하세요.
보너스: Terraform을 사용 중이라면 Terraform을 사용한 AWS 통합
을 참조해 Datadog IAM 정책을 구성하세요.
Datadog
- Datadog AWS 통합 타일로 돌아가세요.
- Role Delegation 탭에서 Manually을 선택하세요.
- 대시(-) 기호 없이 AWS 계정 ID를 입력하세요(예시:
123456789012
). 계정 ID는 AWS 통합 설치
중 생성한 역할의 ARN에서 찾을 수 있습니다. - 생성한 역할 이름을 입력하세요. 참조: 통합 타일에 입력하는 역할 이름은 대소문자를 구별하며, AWS에서 생성된 역할 이름과 정확하게 일치해야 합니다.
- Datadog is not authorized to perform sts:AssumeRole
(Datadog에서 sts:AssumeRole 실행 불가) 오류가 발생한 경우, AWS 신뢰 정책의
sts:ExternalId:
항목이 Datadog AWS 통합 타일 내 생성된 AWS External ID
항목과 일치하는지 확인하세요. - 대화상자 왼쪽에서 메트릭을 수집할 AWS 서비스를 선택합니다.
- 선택 사항: Resource Collection
기능을 활성화하려면
Enable resource configuration collection
상자를 체크 표시하세요(일부 제품과 기능에 필요합니다). - 선택 사항: 모든 호스트와 메트릭에 태그를 추가하세요.
- 선택 사항:
to hosts with tag
텍스트 상자에 AWS 태그를 입력해 EC2 인스턴스의 서브셋을 모니터링하세요. 참조: 인스턴스에 접속된 EBS 볼륨에도 적용됩니다. - 선택 사항:
to Lambdas with tag
텍스트 상자에 AWS 태그를 입력해 Lambdas의 서브셋을 모니터링하세요. - Install Integration을 클릭하세요.
AWS
- AWS 콘솔을 이용해 Datadog 통합에서 사용할 IAM 사용자를 구성하세요.
- Datadog 통합 IAM 사용자용 액세스 키와 시크릿 키를 생성하세요.
자세한 정보는 제3자에게 AWS 리소스 액세스 권한을 부여할 때 외부 ID를 사용하는 방법
AWS 설명서에서 알아볼 수 있습니다.
Datadog
- AWS 통합 타일
을 여세요.
- Access Keys (GovCloud or China Only) 탭을 선택하세요.
AWS Access Key
및 AWS Secret Key
를 입력하세요. GovCloud 및 중국용 액세스 키와 시크릿 키만 사용 가능합니다.- 대화상자 왼쪽에서 메트릭을 수집할 서비스를 선택합니다.
- 선택 사항으로, 모든 호스트와 메트릭에 태그를 추가하세요.
- 선택 사항:
to hosts with tag
텍스트 상자에 AWS 태그를 입력해 EC2 인스턴스의 서브셋을 모니터링하세요. 참조: 인스턴스에 접속된 EBS 볼륨에도 적용됩니다. - 선택 사항:
to Lambdas with tag
텍스트 상자에 AWS 태그를 입력해 Lambdas의 서브셋을 모니터링하세요. - Install Integration을 클릭하세요.
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.
로그 수집
Datadog로 AWS 서비스 로그를 전송하는 방법은 두 가지가 있습니다.
- Kinesis Firehose destination
: Kinesis Firehose 전송 시스템에서 Datadog를 수신 대상으로 지정하여 Datadog로 로그를 전달하세요. 클라우드와치(CloudWatch)에서 평균 이상의 대용량 로그를 보낼 때 이 방법을 사용하시길 권장합니다.
- Forwarder Lambda 함수
: Datadog Forwarder Lambda 함수를 배포하면 S3 버킷 또는 클라우드와치(CloudWatch) 로그 그룹을 구독하고 Datadog로 로그를 전달합니다. Lambda 함수에서 로그를 통해 트레이스, 개선된 메트릭 또는 커스텀 메트릭을 비동기 전송하는 경우 반드시 이 방법을 사용해야 합니다. 또, Datadog에서는 S3나 기타 Kinesis로 직접 데이터를 스트리밍할 수 없는 리소스에서 로그를 전송할 때 이 접근법을 사용하시길 권장합니다.
메트릭 수집
Datadog로 AWS 메트릭을 전송하는 방법은 두 가지가 있습니다.
- 메트릭 폴링
: AWS 통합을 완료하면 API 폴링을 사용할 수 있습니다. 클라우드와치(CloudWatch) API를 메트릭별로 크롤링하여 데이터를 수집한 다음 Datadog로 전송합니다. 신규 메트릭은 평균 10분마다 가져옵니다.
- Kinesis Firehose를 이용한 메트릭 스트리밍
: Amazon CloudWatch Metric Streams 및 Amazon Kinesis Data Firehose를 사용해 메트릭을 확인할 수 있습니다. 참조: 이 방법을 사용하면 2-3분 정도 지연이 발생하며 별도의 설정이 필요합니다.
리소스 수집
일부 Datadog 제품은 AWS 리소스(예: S3 버킷, RDS 스냅숏, CloudFront 배포 등)의 구성 방법과 관련된 정보를 활용합니다. Datadog는 AWS 계정에 읽기 전용 API 호출을 생성해 해당하는 정보를 수집합니다.
Cloud Security Posture Management
설정
AWS 계정에서 AWS를 아직 통합하지 않았다면, 위의 통합 설정 프로세스
를 완료한 다음 리소스 수집이 활성화되었는지 확인해주세요.
이미 다른 Datadog 제품에서 AWS 통합 구성을 마쳤으나 리소스 수집을 활성화하지 않았다면 다음 안내에 따라 진행하세요.
- 자동 - CloudFormation 템플릿 업데이트
- CloudFormation 콘솔에서 Datadog 통합 설치 시 사용한 메인 스택을 찾아
Update
를 선택하세요. Replace current template
옵션을 선택하세요.Amazon S3 URL
을 선택하고 https://datadog-cloudformation-template.s3.amazonaws.com/aws/main.yaml
를 입력한 다음, next
을 클릭하세요.CloudSecurityPostureManagementPermissions
옵션을 참으로 설정하고, 다른 기존 파라미터를 수정하지 않고 next
을 클릭해 Review
페이지가 표시될 때까지 진행합니다. 여기에서 변경 사항의 미리보기를 확인할 수 있습니다.- 하단의 확인 상자 두 개를 체크 표시한 다음
Update stack
옵션을 클릭하세요.
- 수동
- AWS에서 관리하는
SecurityAudit
정책을 Datadog AWS IAM 역할에 연결하세요. 이 정책은 AWS 콘솔
에서 찾아볼 수 있습니다.
- Datadog AWS 통합 타일
로 이동해 다음의 안내를 따라 진행하세요.
- 리소스 수집을 활성화할 AWS 계정을 클릭하세요.
- 해당 계정의 Resource collection 섹션으로 이동해
Route resource data to the Cloud Security Posture Management product
상자를 체크 표시하세요. - 타일 왼쪽 하단에서
Update Configuration
옵션을 클릭하세요.
경보 수집
AWS 클라우드와치(CloudWatch) 경보를 Datadog 이벤트 스트림 Event Stream으로 전송하는 방법은 두 가지가 있습니다.
- 경보 폴링: AWS 통합 후 경보 폴링을 사용할 수 있으며, DescribeAlarmHistory
API를 통해 메트릭 경보를 가져옵니다. 이 방법을 사용하는 경우, 경보는
Amazon Web Services
이벤트 소스로 카테고리가 지정됩니다. 참조: 크롤러는 컴포짓(composite) 경보를 수집하지 않습니다. - 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 태그 키 |
---|
전체 | region |
API Gateway | apiid , apiname , method , resource , stage |
App Runner | instance , serviceid , servicename |
Auto Scaling | autoscalinggroupname , autoscaling_group |
Billing | account_id , budget_name , budget_type , currency , servicename , time_unit |
CloudFront | distributionid |
CodeBuild | project_name |
CodeDeploy | application , creator , deployment_config , deployment_group , deployment_option , deployment_type , status |
DirectConnect | connectionid |
DynamoDB | globalsecondaryindexname , operation , streamlabel , tablename |
EBS | volumeid , volume-name , volume-type |
EC2 | autoscaling_group , availability-zone , image , instance-id , instance-type , kernel , name , security_group_name |
ECS | clustername , servicename , instance_id |
EFS | filesystemid |
ElastiCache | cachenodeid , cache_node_type , cacheclusterid , cluster_name , engine , engine_version , preferred_availability-zone , replication_group |
ElasticBeanstalk | environmentname , enviromentid |
ELB | availability-zone , hostname , loadbalancername , name , targetgroup |
EMR | cluster_name , jobflowid |
ES | dedicated_master_enabled , ebs_enabled , elasticsearch_version , instance_type , zone_awareness_enabled |
Firehose | deliverystreamname |
FSx | filesystemid , filesystemtype |
Health | event_category , status , service |
IoT | actiontype , protocol , rulename |
Kinesis | streamname , name , state |
KMS | keyid |
Lambda | functionname , resource , executedversion , memorysize , runtime |
Machine Learning | mlmodelid , requestmode |
MQ | broker , queue , topic |
OpsWorks | stackid , layerid , instanceid |
Polly | operation |
RDS | auto_minor_version_upgrade , dbinstanceclass , dbclusteridentifier , dbinstanceidentifier , dbname , engine , engineversion , hostname , name , publicly_accessible , secondary_availability-zone |
RDS Proxy | proxyname , target , targetgroup , targetrole |
Redshift | clusteridentifier , latency , nodeid , service_class , stage , wlmid |
Route 53 | healthcheckid |
S3 | bucketname , filterid , storagetype |
SES | 태그 키는 AWS에서 커스텀 설정됩니다. |
SNS | topicname |
SQS | queuename |
VPC | nategatewayid , vpnid , tunnelipaddress |
WorkSpaces | directoryid , workspaceid |
서비스 점검
aws.status
Returns CRITICAL
if one or more AWS regions are experiencing issues. Returns OK
otherwise.
Statuses: ok, critical
트러블슈팅
AWS 통합 관련 문제를 해결하려면 AWS 통합 트러블슈팅 가이드
를 참조하세요.
참고 자료
Additional helpful documentation, links, and articles: