feat(ops/nixos/camden): Modify nginx log format
This log format contains more structured and correctly typed information, which I can now use for dashboards and stuff in Stackdriver.
This commit is contained in:
parent
1e51a2135d
commit
25d8e7ce25
1 changed files with 8 additions and 8 deletions
|
@ -191,15 +191,15 @@ in lib.fix(self: {
|
||||||
commonHttpConfig = ''
|
commonHttpConfig = ''
|
||||||
log_format json_combined escape=json
|
log_format json_combined escape=json
|
||||||
'{'
|
'{'
|
||||||
'"time_local":"$time_local",'
|
|
||||||
'"remote_addr":"$remote_addr",'
|
'"remote_addr":"$remote_addr",'
|
||||||
'"remote_user":"$remote_user",'
|
'"method":"$request_method",'
|
||||||
'"request":"$request",'
|
'"uri":"$request_uri",'
|
||||||
'"status": "$status",'
|
'"status":$status,'
|
||||||
'"body_bytes_sent":"$body_bytes_sent",'
|
'"request_size":$request_length,
|
||||||
'"request_time":"$request_time",'
|
'"response_size":$body_bytes_sent,'
|
||||||
'"http_referrer":"$http_referer",'
|
'"response_time":$request_time,'
|
||||||
'"http_user_agent":"$http_user_agent"'
|
'"referrer":"$http_referer",'
|
||||||
|
'"user_agent":"$http_user_agent"'
|
||||||
'}';
|
'}';
|
||||||
|
|
||||||
access_log syslog:server=unix:/dev/log,nohostname json_combined;
|
access_log syslog:server=unix:/dev/log,nohostname json_combined;
|
||||||
|
|
Loading…
Reference in a new issue