Simple NGINX log file analyzer [closed] Simple NGINX log file analyzer [closed] nginx nginx

Simple NGINX log file analyzer [closed]


You may try with GoAccess; free and open source console based. It may output an HTML report too.


I've come across visitors. It's written in C and is pretty fast.

It lacks goaccess' cool ncruses interface. It only outputs html. It does the job, though.

Edit:It can also output human-readable text reports:

visitors access.log | less


I will suggest to use logstash and Kibana with following patterns :

for access.log :

NGINXACCESS %{IPORHOST:clientip} - %{USERNAME:remote_user} \[%{HTTPDATE:time_local}\] %{QS:request} %{INT:status} %{INT:body_bytes_sent} %{QS:http_referer} %{QS:http_user_agent}

for error.log:

 NGINXERROR (?<timestamp>%{YEAR}[./-]%{MONTHNUM}[./-]%{MONTHDAY}[- ]%{TIME}) \[%{LOGLEVEL:severity}\] %{POSINT:pid}#%{NUMBER}: %{GREEDYDATA:errormessage}(?:, client: (?<clientip>%{IP}|%{HOSTNAME}))(?:, server: %{IPORHOST:server})(?:, request: %{QS:request})?(?:, host: %{QS:host})?(?:, referrer: \"%{URI:referrer})?