내보내기 작업 설명 - Amazon CloudWatch Logs

내보내기 작업 설명

내보내기 작업을 생성하고 나면 작업의 현재 상태를 파악할 수 있습니다.

AWS CLI를 사용하여 내보내기 작업을 설명하려면

명령 프롬프트에서 다음 describe-export-tasks 명령을 사용합니다.

aws logs --profile CWLExportUser describe-export-tasks --task-id "cda45419-90ea-4db5-9833-aade86253e66"

다음은 예제 출력입니다.

{ "exportTasks": [ { "destination": "my-exported-logs", "destinationPrefix": "export-task-output", "executionInfo": { "creationTime": 1441495400000 }, "from": 1441490400000, "logGroupName": "my-log-group", "status": { "code": "RUNNING", "message": "Started Successfully" }, "taskId": "cda45419-90ea-4db5-9833-aade86253e66", "taskName": "my-log-group-09-10-2015", "tTo": 1441494000000 }] }

세 가지 방법으로 describe-export-tasks 명령을 사용할 수 있습니다.

  • 필터가 없는 경우 - 생성 순서의 역순으로 모든 내보내기 작업을 나열합니다.

  • 작업 ID 필터링 - 지정된 ID를 가진 내보내기 작업(존재하는 경우)을 나열합니다.

  • 작업 상태 필터링 - 지정된 상태를 가진 내보내기 작업을 나열합니다.

예를 들어, 다음 명령을 사용하여 FAILED 상태를 필터링합니다.

aws logs --profile CWLExportUser describe-export-tasks --status-code "FAILED"

다음은 예제 출력입니다.

{ "exportTasks": [ { "destination": "my-exported-logs", "destinationPrefix": "export-task-output", "executionInfo": { "completionTime": 1441498600000 "creationTime": 1441495400000 }, "from": 1441490400000, "logGroupName": "my-log-group", "status": { "code": "FAILED", "message": "FAILED" }, "taskId": "cda45419-90ea-4db5-9833-aade86253e66", "taskName": "my-log-group-09-10-2015", "to": 1441494000000 }] }