Created
June 11, 2020 18:57
-
-
Save hewersonfreitas/ab146d8033f3120e8227e6e71aaf2922 to your computer and use it in GitHub Desktop.
varnish-logs.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varnishlog -q '(RespStatus ~ 500 or RespStatus ~ 502 or RespStatus ~ 503)' -i "ReqURL" -I "ReqHeader:Host:" -I "RespHeader:Location:" -i "RespStatus" -I "ReqHeader:Referer:" -a -w /var/log/varnish/varnishlog-errors-500.log -D | |
varnishncsa -F '%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i" "%{Cookie}i" "%{Varnish:hitmiss}x" "%{Varnish:time_firstbyte}x"' -a -w /var/log/varnish/cached-miss.log -D | |
varnishncsa -q '(RespStatus ~ 500 or RespStatus ~ 502 or RespStatus ~ 503)' -a -w /var/log/varnish/varnishncsa-errors-500.log -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment