HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

varnishlog — Display Varnish logs. More information: <https://vinyl-cache.org/docs/trunk/reference/varnishlog.htm

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandlogsvarnishcliinformationvarnishlogmoredisplay

Problem

How to use the varnishlog command: Display Varnish logs. More information: <https://vinyl-cache.org/docs/trunk/reference/varnishlog.html>.

Solution

varnishlog — Display Varnish logs. More information: <https://vinyl-cache.org/docs/trunk/reference/varnishlog.html>.

Display logs in real time:
varnishlog


Only display requests to a specific domain:
varnishlog -q 'ReqHeader eq "Host: {{example.com}}"'


Only display POST requests:
varnishlog -q 'ReqMethod eq "{{POST}}"'


Only display requests to a specific path:
varnishlog -q 'ReqURL eq "/{{path}}"'


Only display requests to paths matching a regex:
varnishlog -q 'ReqURL ~ "{{regex}}"'

Code Snippets

Display logs in real time

varnishlog

Only display requests to a specific domain

varnishlog -q 'ReqHeader eq "Host: {{example.com}}"'

Only display POST requests

varnishlog -q 'ReqMethod eq "{{POST}}"'

Only display requests to a specific path

varnishlog -q 'ReqURL eq "/{{path}}"'

Only display requests to paths matching a `regex`

varnishlog -q 'ReqURL ~ "{{regex}}"'

Context

tldr-pages: common/varnishlog

Revisions (0)

No revisions yet.