how can I read old varnish logs?

Dridi Boukelmoune dridi at varni.sh
Mon Aug 28 10:59:06 CEST 2017


On Mon, Aug 28, 2017 at 9:21 AM, John Cherouvim <jc at eworx.gr> wrote:
> In /var/log/varnish/ I have some old varnish logs, produced by varnishlog
> which, due to logrotated, are now in gz format:
>
>> -rw-r--r--  1 varnishlog varnish 143068514 Aug 10 23:59
>> varnish.log.2017-08-10.gz
>> -rw-r--r--  1 varnishlog varnish 156373518 Aug 11 23:59
>> varnish.log.2017-08-11.gz
>> -rw-r--r--  1 varnishlog varnish 134255825 Aug 12 23:59
>> varnish.log.2017-08-12.gz
>> -rw-r--r--  1 varnishlog varnish 156992529 Aug 13 23:59
>> varnish.log.2017-08-13.gz
>> -rw-r--r--  1 varnishlog varnish 176751837 Aug 14 23:59
>> varnish.log.2017-08-14.gz
>> -rw-r--r--  1 varnishlog varnish 155948012 Aug 16 00:01
>> varnish.log.2017-08-15.gz
>> -rw-r--r--  1 varnishlog varnish 169977134 Aug 17 00:01
>> varnish.log.2017-08-16.gz
>
> I've extracted those in another location and tried to view them via
> head/more but they look binary.
>
> So I then tried opening them with varnishlog using either of the following
> parameters:
>
>> [-N filename]             VSM filename
>> [-r filename]             Binary file input
>
> But that didn't work giving me:
>
>> Can't open log - retrying for 5 seconds
>
> and:
>
>> Can't open log file (Not a VSL file:
>
> Any idea on how can I inspect those historical logs from varnish?

What is the output of `file some_extracted_file`?

They are probably ascii dump of the logs if varnishlog is complaining.

Dridi



More information about the varnish-misc mailing list