Fluentd
Nginx log Format 수정
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;
Fluentd log Format
<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>
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
Ref
관련 문서
Plugin Backlinks: 아무 것도 없습니다.