varnish ログ

Varnishのログはファイルではなく共有メモリに出力されます。
なので、ログを確認するには"varnishlog"という専用のコマンドを利用します

suz-lab.com - このウェブサイトは販売用です! -&nbspsuz-lab リソースおよび情報

4.x フィルタリング

$ varnishlog -g request -q "ReqUrl eq '/'" -i Timestamp,Begin,ReqMethod,ReqUrl,ReqHeader -d

https://info.varnish-software.com/blog/logging-varnish-40

varnishncsa -g request -q "ReqHeader ~ '^Host: .*\.example.com'"

https://info.varnish-software.com/blog/logging-varnish-40

Varnish 4.x

The varnishlog syntax and inner workings changed significantly in Varnish 4, and all examples from Varnishlog 3.x are no longer valid.

Here's how you can filter based on a single connecting IP.

# varnishlog -q "ReqStart ~ '10.0.1.5'"

Varnish: filter by Source IP using Varnishlog (in Varnish 2.x, 3.x and 4.x)