기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
CloudWatch Logs 압축 해제 후 메시지 추출
압축 해제를 활성화하면 메시지 추출도 활성화할 수 있습니다. 메시지 추출을 사용할 때 Firehose는 압축 해제된 CloudWatch Logs 레코드에서 소유자, 로그 그룹, 로그 스트림 등의 모든 메타데이터를 필터링하고 메시지 필드 내의 콘텐츠만 전송합니다. Splunk 대상으로 데이터를 전송하는 경우 Splunk에서 데이터를 구문 분석하기 위해 메시지 추출을 활성화해야 합니다. 다음은 메시지 추출을 사용하거나 사용하지 않은 압축 해제 후의 샘플 출력입니다.
그림 1: 메시지 추출 없이 압축 해제 후 샘플 출력:
{ "owner": "111111111111", "logGroup": "CloudTrail/logs", "logStream": "111111111111_CloudTrail/logs_us-east-1", "subscriptionFilters": [ "Destination" ], "messageType": "DATA_MESSAGE", "logEvents": [ { "id": "31953106606966983378809025079804211143289615424298221568", "timestamp": 1432826855000, "message": "{\"eventVersion\":\"1.03\",\"userIdentity\":{\"type\":\"Root1\"}" }, { "id": "31953106606966983378809025079804211143289615424298221569", "timestamp": 1432826855000, "message": "{\"eventVersion\":\"1.03\",\"userIdentity\":{\"type\":\"Root2\"}" }, { "id": "31953106606966983378809025079804211143289615424298221570", "timestamp": 1432826855000, "message": "{\"eventVersion\":\"1.03\",\"userIdentity\":{\"type\":\"Root3\"}" } ] }
그림 2: 메시지 추출을 사용한 압축 해제 후 샘플 출력:
{"eventVersion":"1.03","userIdentity":{"type":"Root1"} {"eventVersion":"1.03","userIdentity":{"type":"Root2"} {"eventVersion":"1.03","userIdentity":{"type":"Root3"}