Nginx log format for multiple hosts

Does anyone have a approved log file format for nginx saving several hosts to the same file. I have tried the server defined one of ‘combined’ however that does not log the hostname for some reason.

I therefore assume I need to specify the log format manually, can anyone tell me the best format for nginx.

You shouldn’t have to setup the log format manually and it should detect automatically.

Hi Matt,

Thanks for the reply, it cannot detect what is not there and the combined log format simply does not inculde a hostname. Here is an example of the defined combined format for nginx 1.7.3

0.0.0.0 - - [16/Jul/2014:17:52:52 +0100] “GET /revive-images/2cec44dfe6b7a6f63bca076fc5b47638.jpg HTTP/1.1” 200 98446 “http://www.domain.co.uk/” “Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0”

Or do you mean I can create my own log format and just hope that PiWIK understands it.

Stephen

If importing your log format does not work, checkout the list of opened issues:

https://github.com/piwik/piwik/issues?q=is%3Aopen+is%3Aissue+label%3A"c%3A+Log+Analytics+(import_logs.py)"

maybe you could add a comment to one, otherwise create new issue with example log file and how to reproduce the issue