Trending Now
#How to set up suEXEC in Apache
#How to fix the “Pane is dead” error during the installation of Fedora on a HP Proliant server
#Create a Logstash GeoIP dashboard in Kibana 3
#MacBook Air (mid 2011) bootcamp Windows 8.1 enterprise wifi fix
#Nginx SSL example
#How to make Nginx log in JSON format
#Output to Elasticsearch with Rsyslog in Logstash format
#How to install Logstash 1.4 with Kibana 3 on Fedora.
#How to flash your Samsung Galaxy Series phone
#Install WordPress on Windows Server 2012 R2 with MariaDB 10.0 in replication.
Posts Tagged: json
- 1636 Views
- Sjir Bagmeijer
- September 10, 2014
How to make Nginx log in JSON format
To get Nginx to log in JSON format you have to add the following to “nginx.conf” under the http bit: log_format json ‘{ “@timestamp”: “$time_iso8601″, ‘ ‘”message”: “$remote_addr – $remote_user [$time_local] \\\”$request\\\” $status $body_bytes_sent \\\”$http_referer\\\”