Last Updated: February 25, 2016
·
559
· bcoca

Quick http code counts from all nginx servers

I use the following to check http error codes in the current nginx production logs.

ansible webservers -m shell -a "awk '{print \$9}' /var/log/nginx/access.log|sort |uniq -c |sort -k1,1nr 2>/dev/null"