

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# `AWSSupport-TroubleshootOpenSearchRedYellowCluster`
<a name="automation-troubleshoot-opensearch-red-yellow-cluster"></a>

 **설명** 

 `AWSSupport-TroubleshootOpenSearchRedYellowCluster` 자동화 실행서는 [빨간색](https://docs.aws.amazon.com//opensearch-service/latest/developerguide/handling-errors.html#handling-errors-red-cluster-status) 또는 [노란색](https://docs.aws.amazon.com//opensearch-service/latest/developerguide/handling-errors.html#handling-errors-yellow-cluster-status) 클러스터 상태 원인을 식별하고 클러스터를 다시 녹색으로 변경하는 방법을 안내하는 데 사용됩니다.

 **어떻게 작동하나요?**

 실행서는 빨간색 또는 노란색 클러스터의 원인을 해결하는 데 `AWSSupport-TroubleshootOpenSearchRedYellowCluster` 도움이 되며 클러스터 구성 및 리소스 사용률을 분석하여이 문제를 해결하기 위한 다음 단계를 제공합니다.

 실행서는 다음 단계를 수행합니다.
+  대상 도메인에 대해 [DescribeDomain](https://docs.aws.amazon.com//opensearch-service/latest/APIReference/API_DescribeDomain.html) API를 호출하여 클러스터 구성을 가져옵니다.
+  OpenSearch Service 도메인이 인터넷 기반(퍼블릭)인지 아니면 [Amazon Virtual Private Cloud(VPC) 기반](https://docs.aws.amazon.com//opensearch-service/latest/developerguide/vpc.html)인지 확인합니다.
+  클러스터 구성에 따라 퍼블릭 또는 [Amazon VPC 기반](https://docs.aws.amazon.com//lambda/latest/dg/foundation-networking.html) AWS Lambda 함수를 생성합니다. 참고: Lambda 함수에는 클러스터에 대해 OpenSearch Service APIs를 실행하여 클러스터가 빨간색 또는 노란색 상태인 이유를 확인하는 문제 해결 코드가 포함되어 있습니다.
+  Lambda 함수를 삭제합니다.
+  수행된 점검과 빨간색 또는 노란색 클러스터 문제를 해결하기 위한 다음 권장 단계를 표시합니다.

**문서 유형**

자동화

**소유자**

Amazon

**플랫폼**

Linux, macOS, Windows 

**파라미터**

**필수 IAM 권한**

실행서를 성공적으로 사용하려면 `AutomationAssumeRole` 파라미터에 다음 작업이 필요합니다.
+ `cloudformation:CreateStack`
+ `cloudformation:DescribeStacks`
+ `cloudformation:DescribeStackEvents`
+ `cloudformation:DeleteStack`
+ `lambda:CreateFunction`
+ `lambda:DeleteFunction`
+ `lambda:InvokeFunction`
+ `lambda:GetFunction`
+ `es:DescribeDomain`
+ `es:DescribeDomainConfig`
+ `ec2:DescribeSecurityGroups`
+ `ec2:DescribeSubnets`
+ `ec2:DescribeVpcs`
+ `ec2:DescribeNetworkInterfaces`
+ `ec2:CreateNetworkInterface`
+ `ec2:DeleteNetworkInterface`
+ `ec2:DescribeInstances`
+ `ec2:AttachNetworkInterface`
+ `cloudwatch:GetMetricData`
+ `iam:PassRole`

런북을 성공적으로 사용하려면 `LambdaExecutionRole` 파라미터에 다음 작업이 필요합니다.
+ `es:ESHttpGet`
+ `ec2:CreateNetworkInterface`
+ `ec2:DescribeNetworkInterfaces`
+ `ec2:DeleteNetworkInterface`

`LambdaExecutionRole` 정책 개요:

 다음은이 실행서에 필요한 AWS 서비스 및 리소스에 액세스할 수 있는 권한을 함수에 부여하는 Lambda 함수의 실행 역할(AWS Identity and Access Management (IAM) 역할)의 예입니다. 자세한 내용을 알아보려면 [Lambda 실행 역할](https://docs.aws.amazon.com//lambda/latest/dg/lambda-intro-execution-role.html)을 참조하세요.

**참고**  
 `ec2:DescribeNetworkInterfaces`, `ec2:CreateNetworkInterface`및 `ec2:DeleteNetworkInterface`는 Lambda 함수가 Amazon VPC 네트워크 인터페이스를 생성하고 관리할 수 있도록 OpenSearch Service 클러스터가 Amazon VPC 기반인 경우에만 필요합니다. [https://docs.aws.amazon.com//opensearch-service/latest/developerguide/vpc.html](https://docs.aws.amazon.com//opensearch-service/latest/developerguide/vpc.html) 자세한 내용은 [Amazon VPC 및 Lambda 실행 역할의 리소스에 아웃바운드 네트워킹 연결을 참조하세요](https://docs.aws.amazon.com//lambda/latest/dg/configuration-vpc.html#vpc-permissions). [https://docs.aws.amazon.com//lambda/latest/dg/lambda-intro-execution-role.html](https://docs.aws.amazon.com//lambda/latest/dg/lambda-intro-execution-role.html) 

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "es:ESHttpGet",
            "Resource": [
                "arn:aws:es:us-east-1:111122223333:domain/domain-name/",
                "arn:aws:es:us-east-1:111122223333:domain/domain-name/_cluster/health",
                "arn:aws:es:us-east-1:111122223333:domain/domain-name/_cat/indices",
                "arn:aws:es:us-east-1:111122223333:domain/domain-name/_cat/allocation",
                "arn:aws:es:us-east-1:111122223333:domain/domain-name/_cluster/allocation/explain"
            ]
        },
        {
            "Condition": {
                "ArnLikeIfExists": {
                    "ec2:Vpc": "arn:aws:ec2:us-east-1:111122223333:vpc/vpc_id"
                }
            },
            "Action": [
                "ec2:DeleteNetworkInterface",
                "ec2:CreateNetworkInterface",
                "ec2:DescribeNetworkInterfaces",
                "ec2:UnassignPrivateIpAddresses",
                "ec2:AssignPrivateIpAddresses"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}
```

------

 **지침** 

다음 단계에 따라 자동화를 구성합니다.

1. 콘솔에서 [AWSSupport-TroubleshootOpenSearchRedYellowCluster](https://console.aws.amazon.com/systems-manager/documents/AWSSupport-TroubleshootOpenSearchRedYellowCluster/description)로 AWS Systems Manager 이동합니다.

1. Execute automation(자동화 실행)을 선택합니다.

1. 입력 파라미터의 경우, 다음 내용을 입력합니다.
   + **AutomationAssumeRole(선택 사항):**

     Systems Manager Automation이 사용자를 대신하여 작업을 수행하도록 허용하는 (IAM) 역할의 Amazon 리소스 이름 AWS Identity and Access Management (ARN)입니다. 역할을 지정하지 않은 경우, Systems Manager Automation에서는 이 실행서를 시작하는 사용자의 권한을 사용합니다.
   + **LambdaExecutionRole(필수):**

     Lambda가 Amazon OpenSearch Service 클러스터에 대한 요청에 서명하는 데 사용할 IAM 역할의 ARN입니다.
   + **DomainName(필수):**

     빨간색 또는 노란색 클러스터 상태인 OpenSearch Service 도메인의 이름입니다.
   + **UtilizationThreshold(선택 사항):**

     CPUUtilization과 JVMMemoryPressure 지표를 비교하는 데 사용되는 사용률 임계값 백분율입니다. 기본값은 80입니다.  
![\[Input parameters form for AWS Systems Manager Automation with IAM roles and domain settings.\]](http://docs.aws.amazon.com/ko_kr/systems-manager-automation-runbooks/latest/userguide/images/awssupport-troubleshoot-opensearch-red-yellow-cluster_input_paramters.png)

1. OpenSearch Service 클러스터에서 [세분화된 액세스 제어를](https://docs.aws.amazon.com//opensearch-service/latest/developerguide/fgac.html) 활성화한 경우 `LambdaExecutionRole` 역할 ARN이 최소 `cluster_monitor` 권한이 있는 역할에 매핑되었는지 확인합니다.  
![\[클러스터 permissions section showing cluster_monitor permission granted.\]](http://docs.aws.amazon.com/ko_kr/systems-manager-automation-runbooks/latest/userguide/images/awssupport-troubleshoot-opensearch-red-yellow-cluster_permissions.png)  
![\[Backend roles interface showing an AWSIAM role for Lambda execution and options to remove or add roles.\]](http://docs.aws.amazon.com/ko_kr/systems-manager-automation-runbooks/latest/userguide/images/awssupport-troubleshoot-opensearch-red-yellow-cluster_backend_roles.png)

1. 실행을 선택합니다.

1. 자동화가 시작됩니다.

1. 자동화 실행서는 다음 단계를 수행합니다.
   + **GetClusterConfiguration:**

     OpenSearch Service 클러스터 구성을 가져옵니다.
   + **CreateAWSLambdaFunctionStack:**

     를 사용하여 계정에 임시 Lambda 함수를 생성합니다 CloudFormation. Lambda 함수는 OpenSearch Service APIs를 실행하는 데 사용됩니다.
   + **WaitForAWSLambdaFunctionStack:**

     CloudFormation 스택이 완료될 때까지 기다립니다.
   + **GetClusterMetricsFromCloudWatch:**

     Amazon CloudWatch ClusterStatus, CPUUtilization 및 JVMMemoryPressure OpenSearch Service 클러스터 관련 지표와 생성 날짜를 가져옵니다.
   + **RunOpenSearchAPIs:**

     Lambda 함수를 사용하여 OpenSearch Service APIs 호출하고 클러스터 지표 데이터를 분석하여 빨간색 또는 노란색 클러스터 상태의 원인을 진단합니다.
   + **DeleteAWSLambdaFunctionStack:**

     계정에서이 자동화로 생성된 Lambda 함수를 삭제합니다.

1. 완료 후에는 Outputs 섹션에서 실행의 세부 결과를 검토합니다.
   + **RootCause:**

     클러스터 상태가 빨간색 또는 노란색 상태인 식별된 원인에 대한 개요를 제공합니다.
   + **IssueDescription:**

     클러스터가 빨간색 또는 노란색 상태인 이유에 대한 세부 정보와 클러스터를 녹색 상태로 되돌리는 단계를 제공합니다.

 **참조** 

Systems Manager Automation
+ [이 자동화 실행(콘솔)](https://console.aws.amazon.com/systems-manager/automation/execute/AWSSupport-TroubleshootOpenSearchRedYellowCluster)
+ [자동화 실행](https://docs.aws.amazon.com//systems-manager/latest/userguide/automation-working-executing.html)
+ [Automation 설정](https://docs.aws.amazon.com//systems-manager/latest/userguide/automation-setup.html)
+ [Support Automation Workflows 랜딩 페이지](https://aws.amazon.com/premiumsupport/technology/saw/)

AWS 서비스 설명서
+ 자세한 내용은 [Amazon OpenSearch Service 문제 해결을 참조하세요](https://docs.aws.amazon.com//opensearch-service/latest/developerguide/handling-errors.html).