From 6eb1e461fbb32b3e56786ff4b1ffd990373f84fd Mon Sep 17 00:00:00 2001 From: Michael Sofaer and Raphael Sofaer Date: Fri, 26 Nov 2010 10:03:52 -0500 Subject: [PATCH] nginx logs for splunk --- chef/cookbooks/common/templates/default/nginx.conf.erb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chef/cookbooks/common/templates/default/nginx.conf.erb b/chef/cookbooks/common/templates/default/nginx.conf.erb index 3d9bb2ba4..afb99d9b7 100644 --- a/chef/cookbooks/common/templates/default/nginx.conf.erb +++ b/chef/cookbooks/common/templates/default/nginx.conf.erb @@ -14,9 +14,8 @@ http { include mime.types; default_type application/octet-stream; - log_format main '$remote_addr - $remote_user [$time_local] ' - '"$request" $status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; + log_format splunky '$msec code=$status url=$uri bytes=$body_bytes_sent ms=$request_time'; + access_log /usr/local/nginx/logs/access.log splunky; sendfile on;