연결 내역 보기 - AWS Systems Manager

연결 내역 보기

DescribeAssociationExecutions API 작업을 사용하여 특정 연결 ID에 대한 모든 실행을 볼 수 있습니다. 이 작업을 사용하여 State Manager 연결의 상태, 세부 상태, 결과, 마지막 실행 시간 및 추가 정보를 봅니다. State Manager는 AWS Systems Manager의 기능입니다. 이 API 작업에는 지정한 기준에 따라 연결을 찾는 데 도움이 되는 필터도 포함됩니다. 예를 들어 정확한 날짜 및 시간을 지정하고 GREATER_THAN 필터를 사용하여 지정한 날짜 및 시간 이후에 처리된 실행을 볼 수 있습니다.

예를 들어 연결 실행에 실패한 경우 DescribeAssociationExecutionTargets API 작업을 사용하여 특정 실행의 세부 정보를 심층 분석할 수 있습니다. 이 작업은 연결이 실행된 노드 ID와 같은 리소스 및 다양한 연결 상태를 보여줍니다. 그러면 연결 실행에 실패한 리소스나 노드를 확인할 수 있습니다. 그런 다음 리소스 ID를 사용하여 명령 실행 세부 정보를 보고 명령의 어떤 단계가 실패했는지를 확인할 수 있습니다.

이 섹션의 예에는 StartAssociationsOnce API 작업을 사용하여 생성 시 한 번 연결을 실행하는 방법에 대한 정보도 포함되어 있습니다. 실패한 연결 실행을 조사할 때 이 API 작업을 사용할 수 있습니다. 연결이 실패했음을 확인하는 경우 리소스를 변경한 다음 연결을 즉시 실행하여 리소스 변경으로 인해 연결을 성공적으로 실행할 수 있는지 여부를 확인할 수 있습니다.

참고

연결 실행 중에 SSM 문서에 의해 시작된 API 작업은 AWS CloudTrail에 로깅되지 않습니다.

연결 내역 보기(콘솔)

다음 절차를 사용하여 특정 연결 ID에 대한 실행 내역을 본 다음 하나 이상의 리소스에 대한 실행 세부 정보를 봅니다.

특정 연결 ID에 대한 실행 내역을 보려면
  1. AWS Systems Manager 콘솔(https://console.aws.amazon.com/systems-manager/)을 엽니다.

  2. State Manager를 선택합니다.

  3. Association id(연결 ID) 필드에서 내역을 보려는 연결을 선택합니다.

  4. 세부 정보 보기(View details) 버튼을 선택합니다.

  5. Execution history(실행 내역) 탭을 선택합니다.

  6. 리소스 레벨 실행 세부 정보를 보려는 연결을 선택합니다. 예를 들어, Failed(실패) 상태를 보여 주는 연결을 선택합니다. 그런 다음 연결을 실행하는 데 실패한 노드에 대한 실행 세부 정보를 볼 수 있습니다.

    검색 상자 필터를 사용하여 세부 정보를 보려는 실행을 찾습니다.

    State Manager 연결 실행 목록 필터링
  7. 실행 ID를 선택합니다. Association execution targets(연결 실행 대상) 페이지가 열립니다. 이 페이지에는 연결을 실행한 모든 리소스가 표시됩니다.

  8. 리소스 ID를 선택하여 해당 리소스에 대한 구체적인 정보를 봅니다.

    검색 상자 필터를 사용하여 세부 정보를 보려는 리소스를 찾습니다.

    State Manager 연결 실행 대상 목록 필터링
  9. 실행에 실패한 연결을 조사하는 경우 [지금 연결 적용(Apply association now)] 버튼을 사용하여 생성 시 연결을 한 번 실행할 수 있습니다. 연결 실행에 실패한 리소스를 변경한 후 탐색 이동 경로에서 Association ID(연결 ID) 랭크를 선택합니다.

  10. Apply association now(지금 연결 적용) 버튼을 선택합니다. 실행이 완료된 후 해당 연결 실행이 성공했는지를 확인합니다.

연결 내역 보기(명령줄)

다음 절차에서는 AWS Command Line Interface(AWS CLI)(Linux 또는 Windows) 또는 AWS Tools for PowerShell을 사용하여 특정 연결 ID에 대한 실행 내역을 보는 방법을 설명합니다. 그런 다음, 하나 이상의 리소스에 대한 실행 세부 정보를 보는 방법을 설명합니다.

특정 연결 ID에 대한 실행 내역을 보려면
  1. 아직 하지 않은 경우 AWS CLI 또는 AWS Tools for PowerShell을 설치하고 구성합니다.

    자세한 내용은 최신 버전의 AWS CLI 설치 또는 업데이트AWS Tools for PowerShell 설치를 참조하세요.

  2. 다음 명령을 실행하여 특정 연결 ID의 작업 실행 목록을 봅니다.

    Linux & macOS
    aws ssm describe-association-executions \ --association-id ID \ --filters Key=CreatedTime,Value="2018-04-10T19:15:38.372Z",Type=GREATER_THAN
    참고

    이 명령에는 특정 날짜 및 시간 이후에 발생한 실행으로만 결과를 제한하는 필터가 포함됩니다. 특정 연결 ID의 모든 실행을 보려는 경우 --filters 파라미터 및 Key=CreatedTime,Value="2018-04-10T19:15:38.372Z",Type=GREATER_THAN 값을 제거합니다.

    Windows
    aws ssm describe-association-executions ^ --association-id ID ^ --filters Key=CreatedTime,Value="2018-04-10T19:15:38.372Z",Type=GREATER_THAN
    참고

    이 명령에는 특정 날짜 및 시간 이후에 발생한 실행으로만 결과를 제한하는 필터가 포함됩니다. 특정 연결 ID의 모든 실행을 보려는 경우 --filters 파라미터 및 Key=CreatedTime,Value="2018-04-10T19:15:38.372Z",Type=GREATER_THAN 값을 제거합니다.

    PowerShell
    Get-SSMAssociationExecution ` -AssociationId ID ` -Filter @{"Key"="CreatedTime";"Value"="2019-06-01T19:15:38.372Z";"Type"="GREATER_THAN"}
    참고

    이 명령에는 특정 날짜 및 시간 이후에 발생한 실행으로만 결과를 제한하는 필터가 포함됩니다. 특정 연결 ID의 모든 실행을 보려는 경우 -Filter 파라미터 및 @{"Key"="CreatedTime";"Value"="2019-06-01T19:15:38.372Z";"Type"="GREATER_THAN"} 값을 제거합니다.

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

    Linux & macOS
    {
       "AssociationExecutions":[
          {
             "Status":"Success",
             "DetailedStatus":"Success",
             "AssociationId":"c336d2ab-09de-44ba-8f6a-6136cEXAMPLE",
             "ExecutionId":"76a5a04f-caf6-490c-b448-92c02EXAMPLE",
             "CreatedTime":1523986028.219,
             "AssociationVersion":"1"
          },
          {
             "Status":"Success",
             "DetailedStatus":"Success",
             "AssociationId":"c336d2ab-09de-44ba-8f6a-6136cEXAMPLE",
             "ExecutionId":"791b72e0-f0da-4021-8b35-f95dfEXAMPLE",
             "CreatedTime":1523984226.074,
             "AssociationVersion":"1"
          },
          {
             "Status":"Success",
             "DetailedStatus":"Success",
             "AssociationId":"c336d2ab-09de-44ba-8f6a-6136cEXAMPLE",
             "ExecutionId":"ecec60fa-6bb0-4d26-98c7-140308EXAMPLE",
             "CreatedTime":1523982404.013,
             "AssociationVersion":"1"
          }
       ]
    }
    Windows
    {
       "AssociationExecutions":[
          {
             "Status":"Success",
             "DetailedStatus":"Success",
             "AssociationId":"c336d2ab-09de-44ba-8f6a-6136cEXAMPLE",
             "ExecutionId":"76a5a04f-caf6-490c-b448-92c02EXAMPLE",
             "CreatedTime":1523986028.219,
             "AssociationVersion":"1"
          },
          {
             "Status":"Success",
             "DetailedStatus":"Success",
             "AssociationId":"c336d2ab-09de-44ba-8f6a-6136cEXAMPLE",
             "ExecutionId":"791b72e0-f0da-4021-8b35-f95dfEXAMPLE",
             "CreatedTime":1523984226.074,
             "AssociationVersion":"1"
          },
          {
             "Status":"Success",
             "DetailedStatus":"Success",
             "AssociationId":"c336d2ab-09de-44ba-8f6a-6136cEXAMPLE",
             "ExecutionId":"ecec60fa-6bb0-4d26-98c7-140308EXAMPLE",
             "CreatedTime":1523982404.013,
             "AssociationVersion":"1"
          }
       ]
    }
    PowerShell
    AssociationId         : c336d2ab-09de-44ba-8f6a-6136cEXAMPLE
    AssociationVersion    : 1
    CreatedTime           : 8/18/2019 2:00:50 AM
    DetailedStatus        : Success
    ExecutionId           : 76a5a04f-caf6-490c-b448-92c02EXAMPLE
    LastExecutionDate     : 1/1/0001 12:00:00 AM
    ResourceCountByStatus : {Success=1}
    Status                : Success
    
    AssociationId         : c336d2ab-09de-44ba-8f6a-6136cEXAMPLE
    AssociationVersion    : 1
    CreatedTime           : 8/11/2019 2:00:54 AM
    DetailedStatus        : Success
    ExecutionId           : 791b72e0-f0da-4021-8b35-f95dfEXAMPLE
    LastExecutionDate     : 1/1/0001 12:00:00 AM
    ResourceCountByStatus : {Success=1}
    Status                : Success
    
    AssociationId         : c336d2ab-09de-44ba-8f6a-6136cEXAMPLE
    AssociationVersion    : 1
    CreatedTime           : 8/4/2019 2:01:00 AM
    DetailedStatus        : Success
    ExecutionId           : ecec60fa-6bb0-4d26-98c7-140308EXAMPLE
    LastExecutionDate     : 1/1/0001 12:00:00 AM
    ResourceCountByStatus : {Success=1}
    Status                : Success

    하나 이상의 필터를 사용하려 결과를 제한할 수 있습니다. 다음 예는 특정 날짜 및 시간 이전에 실행된 모든 연결을 반환합니다.

    Linux & macOS
    aws ssm describe-association-executions \ --association-id ID \ --filters Key=CreatedTime,Value="2018-04-10T19:15:38.372Z",Type=LESS_THAN
    Windows
    aws ssm describe-association-executions ^ --association-id ID ^ --filters Key=CreatedTime,Value="2018-04-10T19:15:38.372Z",Type=LESS_THAN
    PowerShell
    Get-SSMAssociationExecution ` -AssociationId 14bea65d-5ccc-462d-a2f3-e99c8EXAMPLE ` -Filter @{"Key"="CreatedTime";"Value"="2019-06-01T19:15:38.372Z";"Type"="LESS_THAN"}

    다음은 특정 날짜 및 시간 이후에 성공적으로 실행된 모든 연결을 반환합니다.

    Linux & macOS
    aws ssm describe-association-executions \ --association-id ID \ --filters Key=CreatedTime,Value="2018-04-10T19:15:38.372Z",Type=GREATER_THAN Key=Status,Value=Success,Type=EQUAL
    Windows
    aws ssm describe-association-executions ^ --association-id ID ^ --filters Key=CreatedTime,Value="2018-04-10T19:15:38.372Z",Type=GREATER_THAN Key=Status,Value=Success,Type=EQUAL
    PowerShell
    Get-SSMAssociationExecution ` -AssociationId 14bea65d-5ccc-462d-a2f3-e99c8EXAMPLE ` -Filter @{ "Key"="CreatedTime"; "Value"="2019-06-01T19:15:38.372Z"; "Type"="GREATER_THAN" }, @{ "Key"="Status"; "Value"="Success"; "Type"="EQUAL" }
  3. 다음 명령을 실행하여 특정 실행이 실행된 모든 대상을 봅니다.

    Linux & macOS
    aws ssm describe-association-execution-targets \ --association-id ID \ --execution-id ID
    Windows
    aws ssm describe-association-execution-targets ^ --association-id ID ^ --execution-id ID
    PowerShell
    Get-SSMAssociationExecutionTarget ` -AssociationId 14bea65d-5ccc-462d-a2f3-e99c8EXAMPLE ` -ExecutionId 76a5a04f-caf6-490c-b448-92c02EXAMPLE

    하나 이상의 필터를 사용하려 결과를 제한할 수 있습니다. 다음 예는 특정 연결 실행에 실패한 모든 대상에 대한 정보를 반환합니다.

    Linux & macOS
    aws ssm describe-association-execution-targets \ --association-id ID \ --execution-id ID \ --filters Key=Status,Value="Failed"
    Windows
    aws ssm describe-association-execution-targets ^ --association-id ID ^ --execution-id ID ^ --filters Key=Status,Value="Failed"
    PowerShell
    Get-SSMAssociationExecutionTarget ` -AssociationId 14bea65d-5ccc-462d-a2f3-e99c8EXAMPLE ` -ExecutionId 76a5a04f-caf6-490c-b448-92c02EXAMPLE ` -Filter @{ "Key"="Status"; "Value"="Failed" }

    다음 예는 연결 실행에 실패한 특정 관리형 노드에 대한 정보를 반환합니다.

    Linux & macOS
    aws ssm describe-association-execution-targets \ --association-id ID \ --execution-id ID \ --filters Key=Status,Value=Failed Key=ResourceId,Value="i-02573cafcfEXAMPLE" Key=ResourceType,Value=ManagedInstance
    Windows
    aws ssm describe-association-execution-targets ^ --association-id ID ^ --execution-id ID ^ --filters Key=Status,Value=Failed Key=ResourceId,Value="i-02573cafcfEXAMPLE" Key=ResourceType,Value=ManagedInstance
    PowerShell
    Get-SSMAssociationExecutionTarget ` -AssociationId 14bea65d-5ccc-462d-a2f3-e99c8EXAMPLE ` -ExecutionId 76a5a04f-caf6-490c-b448-92c02EXAMPLE ` -Filter @{ "Key"="Status"; "Value"="Success" }, @{ "Key"="ResourceId"; "Value"="i-02573cafcfEXAMPLE" }, @{ "Key"="ResourceType"; "Value"="ManagedInstance" }
  4. 실행에 실패한 연결을 조사하는 경우 StartAssociationsOnce API 작업을 사용하여 연결을 한 번만 즉시 실행할 수 있습니다. 연결 실행에 실패한 리소스를 변경한 후 다음 명령을 실행하여 연결을 한 번만 즉시 실행합니다.

    Linux & macOS
    aws ssm start-associations-once \ --association-id ID
    Windows
    aws ssm start-associations-once ^ --association-id ID
    PowerShell
    Start-SSMAssociationsOnce ` -AssociationId ID