Last active
December 27, 2015 14:29
-
-
Save edvakf/7340616 to your computer and use it in GitHub Desktop.
isuconで使えそうなnginxのログ形式
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log_format ltsv | |
"time:$time_iso8601" | |
"\treq_time:$request_time" | |
"\tapp_time:$upstream_response_time" | |
"\tres_size:$bytes_sent" | |
"\tstatus:$status" | |
"\tmethod:$request_method" | |
"\tpath:$request_uri" | |
"\thost:$remote_addr" | |
"\tua:$http_user_agent" | |
; | |
#ポイントは | |
# timeは仕様のない$local_timeではなく$time_iso8601なのでRubyだとTime.iso8601でパースできる | |
# $http_user_agentと$request_uriを後ろに持ってくることで前の方のカラムが揃う | |
# 自作スクリプトが使える | |
# http://qiita.com/edvakf@github/items/3bdd46b53d65cf407fa2 | |
# http://qiita.com/edvakf@github/items/4bc602b1e322622777ab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment