

• AWS Systems Manager CloudWatch 대시보드는 2026년 4월 30일 이후에는 더 이상 사용할 수 없습니다. 고객은 Amazon CloudWatch 콘솔을 계속 사용하여 현재와 마찬가지로 Amazon CloudWatch 대시보드를 보고, 생성하고, 관리할 수 있습니다. 자세한 내용은 [Amazon CloudWatch 대시보드 설명서](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)를 참조하세요.

# 수동으로 OpsItems 생성(AWS CLI)
<a name="OpsCenter-creating-OpsItems-CLI"></a>

다음 절차에서는 AWS Command Line Interface(AWS CLI)를 사용하여 OpsItem을 생성하는 방법에 대해 설명합니다.

**AWS CLI를 사용하여 OpsItem룰 생성하려면**

1. 아직 하지 않은 경우 AWS Command Line Interface(AWS CLI)을 설치하고 구성합니다.

   자세한 내용은 [최신 버전의 AWS CLI 설치 또는 업데이트](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)를 참조하세요.

1. AWS CLI를 열고 다음 명령을 실행하여 OpsItem을 생성합니다. 각 {{example resource placeholder}}를 사용자의 정보로 바꿉니다.

   ```
   aws ssm create-ops-item \
       --title "{{Descriptive_title}}" \
       --description "{{Information_about_the_issue}}" \
       --priority {{Number_between_1_and_5}} \
       --source {{Source_of_the_issue}} \
       --operational-data {{Up_to_20_KB_of_data_or_path_to_JSON_file}} \
       --notifications Arn="{{SNS_ARN_in_same_Region}}" \
       --tags "Key={{key_name}},Value={{a_value}}"
   ```

   **파일에서 운영 데이터 지정**

   OpsItem을 생성할 때 파일에서 운영 데이터를 지정할 수 있습니다. 파일은 JSON 파일이어야 하며 파일의 콘텐츠는 다음 형식을 사용해야 합니다.

   ```
   {
     "{{key_name}}": {
       "Type": "SearchableString",
       "Value": "{{Up to 20 KB of data}}"
     }
   }
   ```

   다음 예를 참고하세요

   ```
   aws ssm create-ops-item ^
       --title "EC2 instance disk full" ^
       --description "Log clean up may have failed which caused the disk to be full" ^
       --priority 2 ^
       --source ec2 ^
       --operational-data file:///Users/TestUser1/Desktop/OpsItems/opsData.json ^
       --notifications Arn="arn:aws:sns:us-west-1:12345678:TestUser1" ^
       --tags "Key=EC2,Value=Production"
   ```
**참고**  
다른 로컬 운영 체제의 명령줄에 JSON 형식의 파라미터를 입력하는 방법에 대한 자세한 내용은 *AWS Command Line Interface 사용 설명서*의 [AWS CLI에서 문자열에 따옴표 사용](https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-quoting-strings.html)을 참조하세요.

   시스템은 다음과 같은 정보를 반환합니다.

   ```
   {
       "OpsItemId": "oi-1a2b3c4d5e6f"
   }
   ```

1. 다음 명령을 실행하여 생성한 OpsItem에 대한 세부 정보를 봅니다.

   ```
   aws ssm get-ops-item --ops-item-id {{ID}}
   ```

   시스템은 다음과 같은 정보를 반환합니다.

   ```
   {
       "OpsItem": {
           "CreatedBy": "arn:aws:iam::12345678:user/TestUser",
           "CreatedTime": 1558386334.995,
           "Description": "Log clean up may have failed which caused the disk to be full",
           "LastModifiedBy": "arn:aws:iam::12345678:user/TestUser",
           "LastModifiedTime": 1558386334.995,
           "Notifications": [
               {
                   "Arn": "arn:aws:sns:us-west-1:12345678:TestUser"
               }
           ],
           "Priority": 2,
           "RelatedOpsItems": [],
           "Status": "Open",
           "OpsItemId": "oi-1a2b3c4d5e6f",
           "Title": "EC2 instance disk full",
           "Source": "ec2",
           "OperationalData": {
               "EC2": {
                   "Value": "12345",
                   "Type": "SearchableString"
               }
           }
       }
   }
   ```

1. 다음 명령을 실행하여 OpsItem을 업데이트합니다. 이 명령은 상태를 `Open`(기본값)에서 `InProgress`로 변경합니다.

   ```
   aws ssm update-ops-item --ops-item-id {{ID}} --status InProgress
   ```

   이 명령에는 출력이 없습니다.

1. 다음 명령을 다시 실행하여 상태가 `InProgress`로 변경되었는지 확인합니다.

   ```
   aws ssm get-ops-item --ops-item-id {{ID}}
   ```

## OpsItem 생성의 예제
<a name="OpsCenter_creating_OpsItems-CLI_examples"></a>

다음 코드 예제에서는 Linux 관리 포털, macOS 또는 Windows Server를 사용하여 OpsItem을 생성하는 방법을 보여줍니다.

**Linux 관리 포털 또는 macOS**

다음 명령은 Amazon Elastic Compute Cloud(Amazon EC2) 인스턴스 디스크가 가득 차면 OpsItem을 생성합니다.

```
aws ssm create-ops-item \
    --title "EC2 instance disk full" \
    --description "Log clean up may have failed which caused the disk to be full" \
    --priority 2 \
    --source ec2 \
    --operational-data '{"EC2":{"Value":"12345","Type":"SearchableString"}}' \
    --notifications Arn="arn:aws:sns:us-west-1:12345678:TestUser1" \
    --tags "Key=EC2,Value=ProductionServers"
```

다음 명령은 `OperationalData`의 `/aws/resources` 키를 사용하여 Amazon DynamoDB 관련 리소스가 있는 OpsItem을 생성합니다.

```
aws ssm create-ops-item \
    --title "EC2 instance disk full" \
    --description "Log clean up may have failed which caused the disk to be full" \
    --priority 2 \
    --source ec2 \
    --operational-data '{"/aws/resources":{"Value":"[{\"arn\": \"arn:aws:dynamodb:us-west-2:12345678:table/OpsItems\"}]","Type":"SearchableString"}}' \
    --notifications Arn="arn:aws:sns:us-west-2:12345678:TestUser"
```

다음 명령은 `OperationalData`의 `/aws/automations` 키를 사용하여 `AWS-ASGEnterStandby` 문서를 연결된 Automation 런북으로 지정하는 OpsItem을 생성합니다.

```
aws ssm create-ops-item \
    --title "EC2 instance disk full" \
    --description "Log clean up may have failed which caused the disk to be full" \
    --priority 2 \
    --source ec2 \
    --operational-data '{"/aws/automations":{"Value":"[{\"automationId\": \"AWS-ASGEnterStandby\", \"automationType\": \"AWS::SSM::Automation\"}]","Type":"SearchableString"}}' \
    --notifications Arn="arn:aws:sns:us-west-2:12345678:TestUser"
```

**Windows**

다음 명령은 Amazon Relational Database Service(Amazon RDS) 인스턴스가 응답하지 않을 때 OpsItem을 생성합니다.

```
aws ssm create-ops-item ^
    --title "RDS instance not responding" ^
    --description "RDS instance not responding to ping" ^
    --priority 1 ^
    --source RDS ^
    --operational-data={\"RDS\":{\"Value\":\"abcd\",\"Type\":\"SearchableString\"}} ^
    --notifications Arn="arn:aws:sns:us-west-1:12345678:TestUser1" ^
    --tags "Key=RDS,Value=ProductionServers"
```

다음 명령은 `OperationalData`의 `/aws/resources` 키를 사용하여 Amazon EC2 인스턴스 관련 리소스가 있는 OpsItem을 생성합니다.

```
aws ssm create-ops-item ^
    --title "EC2 instance disk full" ^
    --description "Log clean up may have failed which caused the disk to be full" ^
    --priority 2 ^
    --source ec2 ^
    --operational-data={\"/aws/resources\":{\"Value\":\"[{\\"""arn\\""":\\"""arn:aws:ec2:us-east-1:123456789012:instance/i-1234567890abcdef0\\"""}]\",\"Type\":\"SearchableString\"}}
```

다음 명령은 `OperationalData`의 `/aws/automations` 키를 사용하여 `AWS-RestartEC2Instance` 런북을 연결된 Automation 런북으로 지정하는 OpsItem을 생성합니다.

```
aws ssm create-ops-item ^
    --title "EC2 instance disk full" ^
    --description "Log clean up may have failed which caused the disk to be full" ^
    --priority 2 ^
    --source ec2 ^
    --operational-data={\"/aws/automations\":{\"Value\":\"[{\\"""automationId\\""":\\"""AWS-RestartEC2Instance\\”"",\\"""automationType\\""":\\"""AWS::SSM::Automation\\"""}]\",\"Type\":\"SearchableString\"}}
```