Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
TOP and Logs command varnish 4
# Muestro las URL que se envian al backend
varnishtop -i BereqURL
# Muestro todas URL peticionadas
varnishtop -i requrl
# Mostrar peticiones metodo
varnishtop -i reqMethod
# Mostrar HTTP status
varnishtop -i respStatus
# Mostrar peticiones metodo enviados al backend
varnishtop -i bereqMethod
# Top IP address
varnishtop -i ReqStart
# Top IP address proxy
varnishtop -C -I ReqHeader:X-Forwarded-For
# Top IP adress cloudflare
varnishtop -C -I ReqHeader:CF-Connecting-IP
# Top IP adress Sucuri Security
varnishtop -C -I ReqHeader:SUCURI-CLIENTIP
# Top Referer
varnishtop -C -I ReqHeader:Referer
# Top user agent
varnishtop -C -I ReqHeader:User-Agent
# Filtrar las redirecciones permanentes (301) y mostrar host url y destino
varnishlog -q "RespStatus ~ 301" -i "ReqURL" -I "ReqHeader:Host:" -I "RespHeader:Location:" -i "RespStatus"
# Filtrar por host, y mostrar ReqURL y Referer
varnishlog -q 'ReqHeader ~ "Host: (www\.)?example\.com"' -i "ReqURL" -I "ReqHeader:Referer:"
# Show the top piped URLs
varnishtop -b -i BereqUrl -q Begin "~" "pipe"
# Show the top missed URLs
varnishtop -i ReqURL -q 'VCL_call eq "MISS"'
# See HIT requests slower than 2 seconds
varnishtop -I Timestamp:Resp -q 'Timestamp:Resp ~ "\ [2-9]\." and VCL_call eq "HIT"'
# See all the logs from a specific domain
varnishlog -q '(ReqHeader:Host ~ "example.com.br" and ReqURL eq "/") or (BereqHeader:Host ~ "example.com.br" and BereqURL eq "/")'
# Ver IP cloudflare involucradas en error 403
varnishtop -q "RespStatus ~ 403" -I "ReqHeader:CF-Connecting-IP"
#BereqMethod,BereqURL,BereqHeader,BerespStatus,BerespHeader,reqMethod,reqURL,reqHeader,respStatus,respHeader,TTL,VCL_call,VCL_return,RespHeader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment