Category Archives: Random

Just stuff of randomness.

Monitor Varnish traffic with hits and misses

Just a small one-liner to monitor traffic going through varnish. Hits and misses are coloured to you can easily see what goes to your backend and what doesn’t. Bot traffic is also coloured 🙂

varnishncsa -F '%s %h %{Varnish:hitmiss}x %D %l %u %t "%r" %b "%{User-agent}i"' | GREP_COLOR='01;31' egrep --line-buffered --color=always 'miss|
 | GREP_COLOR='01;32' egrep --line-buffered --color=always 'hit|
 | GREP_COLOR='01;33' egrep --line-buffered --color=always '^.*css.*$|^.*\/img.*$|^.*font.*$|^.*js.*$|
 | GREP_COLOR='01;35' egrep --line-buffered --color=always '^.*bot.*$|

Hello world!

Finally, i created a blog just for myself and all things around me… This has been spinning around in my mind for a very long time. And today i felt the need to create one. The domain name was already in my possession for quite some time. Hopefully i’ll be posting some nice stuff here in the future 🙂