-
다음
CREATE TABLE
문을 복사하여 Athena 콘솔의 쿼리 편집기에 붙여넣은 다음 자체 로그 항목 요구 사항에 필요한 대로 수정합니다. Athena 콘솔 시작하기에 대한 자세한 내용은 시작 섹션을 참조하세요.LOCATION
절의 경로를 Amazon S3 액세스 로그 폴더의 위치로 바꿉니다. 액세스 로그 파일 위치에 대한 자세한 내용은 Application Load Balancer 사용 설명서의 액세스 로그 파일을 참조하세요.각 로그 파일 필드에 대한 자세한 내용은 Application Load Balancer 사용 설명서의 액세스 로그 항목을 참조하세요.
참고
다음 예제
CREATE TABLE
문에는 최근에 추가된classification
,classification_reason
및conn_trace_id
('추적성 ID' 또는 TID) 열이 포함되어 있습니다. 이러한 항목을 포함하지 않은 Application Load Balancer 액세스 로그에 대한 테이블을 생성하려면CREATE TABLE
문에서 해당되는 열을 제거하고 그에 따라 정규 표현식을 수정합니다.CREATE EXTERNAL TABLE IF NOT EXISTS alb_access_logs ( type string, time string, elb string, client_ip string, client_port int, target_ip string, target_port int, request_processing_time double, target_processing_time double, response_processing_time double, elb_status_code int, target_status_code string, received_bytes bigint, sent_bytes bigint, request_verb string, request_url string, request_proto string, user_agent string, ssl_cipher string, ssl_protocol string, target_group_arn string, trace_id string, domain_name string, chosen_cert_arn string, matched_rule_priority string, request_creation_time string, actions_executed string, redirect_url string, lambda_error_reason string, target_port_list string, target_status_code_list string, classification string, classification_reason string, conn_trace_id string ) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe' WITH SERDEPROPERTIES ( 'serialization.format' = '1', 'input.regex' = '([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*):([0-9]*) ([^ ]*)[:-]([0-9]*) ([-.0-9]*) ([-.0-9]*) ([-.0-9]*) (|[-0-9]*) (-|[-0-9]*) ([-0-9]*) ([-0-9]*) \"([^ ]*) (.*) (- |[^ ]*)\" \"([^\"]*)\" ([A-Z0-9-_]+) ([A-Za-z0-9.-]*) ([^ ]*) \"([^\"]*)\" \"([^\"]*)\" \"([^\"]*)\" ([-.0-9]*) ([^ ]*) \"([^\"]*)\" \"([^\"]*)\" \"([^ ]*)\" \"([^\\s]+?)\" \"([^\\s]+)\" \"([^ ]*)\" \"([^ ]*)\" ?([^ ]*)?' ) LOCATION 's3://amzn-s3-demo-bucket/
access-log-folder-path
/' -
Athena 콘솔에서 쿼리를 실행합니다. 쿼리가 완료된 후 Athena는
alb_access_logs
테이블을 등록하여 쿼리를 실행할 수 있도록 데이터를 준비합니다.
ALB 액세스 로그용 테이블 생성
포커스 모드
이 페이지의 내용이 도움이 되었습니까? - 예
칭찬해 주셔서 감사합니다!
잠깐 시간을 내어 좋았던 부분을 알려 주시면 더 열심히 만들어 보겠습니다.
이 페이지의 내용이 도움이 되었습니까? - 아니요
이 페이지에 작업이 필요하다는 점을 알려 주셔서 감사합니다. 실망시켜 드려 죄송합니다.
잠깐 시간을 내어 설명서를 향상시킬 수 있는 방법에 대해 말씀해 주십시오.