문서 보기역링크PDF로 내보내기맨 위로 이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. # Fluentd ### Nginx log Format 수정 <code> log_format format '$remote_addr $time_iso8601 $request_uri $request_length $request_time "$http_user_agent"'; access_log /var/log/nginx/access.log format; error_log /var/log/nginx/error.log; </code> ### Fluentd log Format <code> <source> type tail path /var/log/nginx/access.log #...or where you placed your Apache access log pos_file /var/log/td-agent/nginx-access.log.pos tag nginx.access #fluentd tag! time_format %d/%b/%Y:%H:%M:%S %z format /^(?<remote_addr>[^ ]*) - (?<remote_user>[^ ]*) \[(?<time>[^\]]*)\]\s+"(?<request_type>[^ ]*) (?<request_url>[^ ]*) (?<request_http_protocol>[^ ]*)" (?<status>[^"]*) (?<body_bytes_sent>[^ ]*) "(?<http_referer>[^"]*)" "(?<http_user_agent>[^"]*)" (?<request_time>[^ ]*)/ </source> </code> <code> format /^(?<host>[^ ]*) (?<time>[^ ]*) (?<urlpath>[^ ]*) (?<size>[0-9]*) (?<duration>[0-9]*\.[0-9]*) "(?<agent>[^\"]*)"$/ types host:string,time:time,urlpath:string,size:integer,duration:float,agent:string </code> ## Ref - https://github.com/fluent/fluentd - http://hongsa.github.io/fluentd/ - https://github.com/justinbuzzni/fluentd-elastic-kibana/blob/master/fluentd/conf/fluent.conf open/fluentd.txt 마지막으로 수정됨: 2021/03/30 00:21저자 127.0.0.1